{
  "info": {
    "_postman_id": "2a3b7b58-9aaf-4fcc-8025-894ccbc599dc",
    "name": "Протокол 1.4 Врачебное свидетельство о смерти (мертворождении)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "37937048"
  },
  "item": [
    {
      "name": "Кейс 1. Создание окончательного ЭВСС (Смерть вне организации здравоохранения без вскрытия).",
      "item": [
        {
          "name": "предварительные условия",
          "item": [
            {
              "name": "создание пациента",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                      "    pm.response.to.have.status(202);\r",
                      "});\r",
                      "\r",
                      "var jsonData = pm.response.json();\r",
                      "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                      "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                      "\r",
                      "console.log(statusReference.valueReference.reference);\r",
                      "\r",
                      "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                      "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                },
                {
                  "listen": "prerequest",
                  "script": {
                    "exec": [
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Fhir-By-Version",
                    "value": "active",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient3\",\r\n                        \"display\": \"Евдокимова Л.И.\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Филатов И.А.\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"Patient3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7150892A001PB9\"\r\n                    }\r\n                    \r\n                    \r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Евдокимова\",\r\n                        \"given\": [\r\n                            \"Людмила\",\r\n                            \"Ивановна\"\r\n                        ]\r\n                    }\r\n                ],\r\n              \r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1996-02-28\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ],\r\n                \"contact\": [\r\n                    {\r\n                        \"name\": {\r\n                            \"family\": \"Петров\",\r\n                            \"given\": [\r\n                                \"Иван\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"80299099090\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Bundle",
                    "$import"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "получение статуса импорта пакета медицинских данных",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Bundle",
                    "{{bundleId}}",
                    "$status"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "поиск пациента по идентификационному номеру",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "var jsonData = pm.response.json();\r",
                      "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                      "\r",
                      "pm.collectionVariables.set(\"patientId\", patientId);\r",
                      "console.log(patientId)\r",
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7150892A001PB9",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Patient"
                  ],
                  "query": [
                    {
                      "key": "identifier",
                      "value": "7150892A001PB9"
                    }
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Метод импорта пакета медицинской информации (указание даты смерти пациента)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"Patient3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7150892A001PB9\"\r\n                    }\r\n                   \r\n                    \r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Евдокимова\",\r\n                        \"given\": [\r\n                            \"Людмила\",\r\n                            \"Ивановна\"\r\n                        ]\r\n                    }\r\n                ],\r\n              \r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1996-02-28\",\r\n                \"deceasedDateTime\": \"2026-02-12T14:10:00Z\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ],\r\n                \"contact\": [\r\n                    {\r\n                        \"name\": {\r\n                            \"family\": \"Петров\",\r\n                            \"given\": [\r\n                                \"Иван\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"80299099090\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данныx",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод поиск пациента по идентификационному номеру (указана дата смерти)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"patientId\", patientId);\r",
                  "console.log(patientId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7150892A001PB9",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient"
              ],
              "query": [
                {
                  "key": "identifier",
                  "value": "7150892A001PB9"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки отсутствия сведений окончательного врачебного свидетельства о смерти",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=completed",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "completed"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод получения идентификатора электронного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const response = pm.response.json();\r",
                  "const identifier = response.parameter.find(t => t.name === \"identifier\").valueString;\r",
                  "\r",
                  "const identifierValue = identifier.split('-')[2];\r",
                  "pm.collectionVariables.set(\"docIdentifier\", identifier);\r",
                  "pm.collectionVariables.set(\"docIdentifierValue\", identifierValue);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Parameters\",\r\n    \"parameter\": [\r\n        {\r\n            \"name\": \"document-code\",\r\n            \"valueCoding\": {\r\n                \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                \"code\": \"03\"\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/$get-document-id",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "$get-document-id"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Валидация пакета данных",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "var compressedBundle = pm.request.body.raw;\r",
                  "\r",
                  "let organizationId = pm.environment.get(\"OrganizationId\");\r",
                  "let practitionerId = pm.environment.get(\"PractitionerId\");\r",
                  "let practitionerRole = pm.environment.get(\"PractitionerRole\");\r",
                  "let practitionerRoleHeadId = pm.environment.get(\"PractitionerRoleHeadId\");\r",
                  "let patientId = pm.collectionVariables.get(\"patientId\");\r",
                  "let randomId = pm.variables.replaceIn(\"{{$guid}}\");\r",
                  "let docIdentifier = pm.environment.get(\"docIdentifier\") || pm.collectionVariables.get(\"docIdentifier\") || \"\";\r",
                  "\r",
                  "compressedBundle = compressedBundle\r",
                  "    .replace(/{{OrganizationId}}/g, organizationId)\r",
                  "    .replace(/{{PractitionerId}}/g, practitionerId)    \r",
                  "    .replace(/{{PractitionerRole}}/g, practitionerRole)\r",
                  "    .replace(/{{randomGuid}}/g, randomId)\r",
                  "    .replace(/{{patientId}}/g, patientId)\r",
                  "    .replace(/{{PractitionerRoleHeadId}}/g, practitionerRoleHeadId)\r",
                  "    .replace(/{{randomValue}}/g, Math.random().toString().replace(\".\",\"\"))\r",
                  "    .replace(/{{docIdentifier}}/g, docIdentifier);\r",
                  "\r",
                  "compressedBundle = JSON.stringify(JSON.parse(compressedBundle));\r",
                  "pm.collectionVariables.set(\"compressedBundle\", compressedBundle);\r",
                  "pm.environment.set(\"data_raw1\", compressedBundle);\r",
                  "\r",
                  "console.log(compressedBundle)"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleDeathCertificateWithoutSection\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/BundleDeathCertificate\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://minzdrav.gov.by\",\r\n        \"value\": \"{{docIdentifier}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-05-05T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-05-05T05:35:21Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificateComposition\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"death-conclusion\",\r\n                            \"display\": \"Врачебное свидетельство о смерти\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-05-05T05:35:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Врач-терапевт участковый, Филатов Олег Михайлович\"\r\n                    }\r\n                ],\r\n                \"title\": \"Электронное врачебное свидетельство о смерти\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\",\r\n                    \"display\": \"Поликлиника №5\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Provenance/ExampleProvenanceDocumentInfoDeath\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisVeins\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleDeadPatientED\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"ExampleDeadPatientED\",\r\n                \"meta\": {\r\n                   \r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientED\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DocumentKind\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                                    \"code\": \"03\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7150892A001PB9\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Евдокимова\",\r\n                        \"given\": [\r\n                            \"Людмила\",\r\n                            \"Ивановна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1996-02-28\",\r\n                \"deceasedDateTime\": \"2026-02-12T14:10:00Z\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.91\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.109\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г. Могилев, Переулок Снежный\",\r\n                        \"line\": [\r\n                            \"Переулок Снежный\"\r\n                        ],\r\n                        \"city\": \"г. Могилев\",\r\n                        \"state\": \"Могилевская область\",\r\n                        \"country\": \"Беларусь\"\r\n                    }\r\n                ],\r\n                \"link\": [\r\n                    {\r\n                        \"other\": {\r\n                            \"reference\": \"Patient/{{patientId}}\"\r\n                        },\r\n                        \"type\": \"refer\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Provenance/ExampleProvenanceDocumentInfoDeath\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Provenance\",\r\n                \"id\": \"ExampleProvenanceDocumentInfoDeath\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ProvenanceDocumentInfoDeath\"\r\n                    ]\r\n                },\r\n                \"target\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"recorded\": \"2026-02-12\",\r\n                \"agent\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"organization\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Открытое акционерное общество \\\"Агентство сервисизации и реинжиниринга\\\"\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitioner\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                            \"display\": \"Филатов Игорь Петрович\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitionerRole\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\",\r\n                            \"display\": \"Врач-кардиохирург\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDepression\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDepression\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I50.0\"\r\n                           \r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDiabet\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDiabet\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I25.2\"\r\n                           \r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisVeins05\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisVeins05\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I25.1\"\r\n                           \r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisVeins\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisVeins\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"C61\"\r\n                            \r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificate\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AgeOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgeOfDeath\",\r\n                                    \"code\": \"04\",\r\n                                    \"display\": \"умер в возрасте старше года\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                                    \"code\": \"5170301729728235\",\r\n                                                    \"display\": \"Проспект Партизанский, 83\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                        \"valueString\": \"кв. 11\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceOutsideOrganization\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeathByCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/PlaceOfDeathByCode\",\r\n                                            \"code\": \"4\",\r\n                                            \"display\": \"дома\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeath\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EstablishmentOfCauseOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EstablishmentOfCauseOfDeath\",\r\n                                    \"code\": \"2\",\r\n                                    \"display\": \"записей лечащего врача в медицинской документации\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"system\": \"https://minzdrav.gov.by\",\r\n                        \"value\": \"{{docIdentifier}}\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Поликлиника №5\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                },\r\n                \"date\": \"2026-02-12T05:35:21Z\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"finding\": [\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"DirectlyDeathReason\",\r\n                                        \"display\": \"Непосредственная причина смерти (мертворождения) - заболевание или состояние, непосредственно приведшее к смерти\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDepression\",\r\n                                \"display\": \"I50.0 - Застойная сердечная недостаточность\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"ConditionsForDirectlyDeathReason\",\r\n                                        \"display\": \"Патологические состояния (заболевания), вызвавшие или обусловившие непосредственную причину смерти (мертворождения)\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDiabet\",\r\n                                \"display\": \"I25.2 - Перенесенный в прошлом инфаркт миокарда\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"MainDeathReason\",\r\n                                        \"display\": \"Основная причина смерти (мертворождения) - первоначальное заболевание или состояние\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisVeins05\",\r\n                                \"display\": \"I25.1 - Атеросклеротическая болезнь сердца\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"OtherCondition\",\r\n                                        \"display\": \"Прочие важные состояния, сопутствующие смерти (мертворождению), но не связанные с заболеванием или патологическим состоянием, приведшим к ней\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisVeins\",\r\n                                \"display\": \"C61 - Злокачественное новообразование предстательной железы\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$validate",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$validate"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Подписание пакета",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "let responseJson = pm.response.json();\r",
                  "pm.environment.set(\"cmsValue\", responseJson.cms);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "const CryptoJS = require('crypto-js');\r",
                  "const data_raw1 = pm.environment.get('data_raw1');\r",
                  "const data_base64 = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(data_raw1));\r",
                  "pm.environment.set('data_base64', data_base64);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"data\": \"{{data_base64}}\",\r\n    \"isDetached\": \"false\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "http://localhost:8084/sign",
              "protocol": "http",
              "host": [
                "localhost"
              ],
              "port": "8084",
              "path": [
                "sign"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Импорт подписанного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/cms",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "\"{{cmsValue}}\"",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данных",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия сведений окончательного врачебного свидетельства о смерти",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=completed",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "completed"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 2. Создание предварительного и окончательного ЭВСС. (Смерть вне организации здравоохранения, со вскрытием) ребенок 4 дней жизни",
      "item": [
        {
          "name": "предварительные условия",
          "item": [
            {
              "name": "создание пациента",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                      "    pm.response.to.have.status(202);\r",
                      "});\r",
                      "\r",
                      "var jsonData = pm.response.json();\r",
                      "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                      "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                      "\r",
                      "console.log(statusReference.valueReference.reference);\r",
                      "\r",
                      "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                      "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                },
                {
                  "listen": "prerequest",
                  "script": {
                    "exec": [
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Fhir-By-Version",
                    "value": "active",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient3\",\r\n                        \"display\": \"Евдокимова Л.И.\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Филатов И.А.\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"Patient3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551509A009PB3\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Семёнов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Иванович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"2026-02-01\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Bundle",
                    "$import"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "получение статуса импорта пакета медицинских данных",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Bundle",
                    "{{bundleId}}",
                    "$status"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "поиск пациента по идентификационному номеру",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "var jsonData = pm.response.json();\r",
                      "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                      "\r",
                      "pm.collectionVariables.set(\"patientId\", patientId);\r",
                      "console.log(patientId)\r",
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551509A009PB3",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Patient"
                  ],
                  "query": [
                    {
                      "key": "identifier",
                      "value": "7551509A009PB3"
                    }
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Метод импорта пакета медицинской информации (указание даты смерти пациента)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"Patient3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551509A009PB3\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Семёнов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Иванович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"2026-02-01\",\r\n                \"deceasedDateTime\": \"2026-02-05T14:10:00Z\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данныx",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод поиск пациента по идентификационному номеру (указана дата смерти)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"patientId\", patientId);\r",
                  "console.log(patientId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551509A009PB3",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient"
              ],
              "query": [
                {
                  "key": "identifier",
                  "value": "7551509A009PB3"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки отсутствия сведений предварительного врачебного свидетельства о смерти",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=in-progress",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "in-progress"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод получения идентификатора электронного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const response = pm.response.json();\r",
                  "const identifier = response.parameter.find(t => t.name === \"identifier\").valueString;\r",
                  "\r",
                  "const identifierValue = identifier.split('-')[2];\r",
                  "pm.collectionVariables.set(\"docIdentifier\", identifier);\r",
                  "pm.collectionVariables.set(\"docIdentifierValue\", identifierValue);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Parameters\",\r\n    \"parameter\": [\r\n        {\r\n            \"name\": \"document-code\",\r\n            \"valueCoding\": {\r\n                \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                \"code\": \"03\"\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/$get-document-id",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "$get-document-id"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Валидация пакета данных",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "var compressedBundle = pm.request.body.raw;\r",
                  "\r",
                  "let organizationId = pm.environment.get(\"OrganizationId\");\r",
                  "let practitionerId = pm.environment.get(\"PractitionerId\");\r",
                  "let practitionerRole = pm.environment.get(\"PractitionerRole\");\r",
                  "let practitionerRoleHeadId = pm.environment.get(\"PractitionerRoleHeadId\");\r",
                  "let patientId = pm.collectionVariables.get(\"patientId\");\r",
                  "let randomId = pm.variables.replaceIn(\"{{$guid}}\");\r",
                  "let docIdentifier = pm.environment.get(\"docIdentifier\") || pm.collectionVariables.get(\"docIdentifier\") || \"\";\r",
                  "\r",
                  "compressedBundle = compressedBundle\r",
                  "    .replace(/{{OrganizationId}}/g, organizationId)\r",
                  "    .replace(/{{PractitionerId}}/g, practitionerId)    \r",
                  "    .replace(/{{PractitionerRole}}/g, practitionerRole)\r",
                  "    .replace(/{{randomGuid}}/g, randomId)\r",
                  "    .replace(/{{patientId}}/g, patientId)\r",
                  "    .replace(/{{PractitionerRoleHeadId}}/g, practitionerRoleHeadId)\r",
                  "    .replace(/{{randomValue}}/g, Math.random().toString().replace(\".\",\"\"))\r",
                  "    .replace(/{{docIdentifier}}/g, docIdentifier);\r",
                  "\r",
                  "compressedBundle = JSON.stringify(JSON.parse(compressedBundle));\r",
                  "pm.collectionVariables.set(\"compressedBundle\", compressedBundle);\r",
                  "pm.environment.set(\"data_raw1\", compressedBundle);\r",
                  "\r",
                  "console.log(compressedBundle)"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleDeathCertificateWithoutSection\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/BundleDeathCertificate\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://minzdrav.gov.by\",\r\n        \"value\": \"{{docIdentifier}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-05-05T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-05-05T05:35:21Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificateComposition\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"death-conclusion\",\r\n                            \"display\": \"Врачебное свидетельство о смерти\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-05-05T05:35:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Врач-терапевт участковый, Филатов Олег Михайлович\"\r\n                    }\r\n                ],\r\n                \"title\": \"Электронное врачебное свидетельство о смерти\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\",\r\n                    \"display\": \"Поликлиника №5\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Provenance/ExampleProvenanceDocumentInfoDeath\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"RelatedPerson/f60d152a-9c19-402a-92a2-5ad32eb0eab7\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleDeadPatientED\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"ExampleDeadPatientED\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientED\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DocumentKind\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                                    \"code\": \"03\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551509A009PB3\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Семёнов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Иванович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"2026-02-01\",\r\n                \"deceasedDateTime\": \"2026-02-05T14:10:00Z\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ],\r\n                \"link\": [\r\n                    {\r\n                        \"other\": {\r\n                            \"reference\": \"Patient/{{patientId}}\"\r\n                        },\r\n                        \"type\": \"refer\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Provenance/ExampleProvenanceDocumentInfoDeath\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Provenance\",\r\n                \"id\": \"ExampleProvenanceDocumentInfoDeath\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ProvenanceDocumentInfoDeath\"\r\n                    ]\r\n                },\r\n                \"target\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"recorded\": \"2026-02-05\",\r\n                \"agent\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"organization\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Открытое акционерное общество \\\"Агентство сервисизации и реинжиниринга\\\"\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitioner\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                            \"display\": \"Филатов Игорь Петрович\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitionerRole\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\",\r\n                            \"display\": \"Врач-кардиохирург\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDepression\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDepression\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2024-08-08\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"F32.0\",\r\n                            \"display\": \"F32.0 - Депрессивный эпизод легкой степени\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2024-08-08\",\r\n                \"recordedDate\": \"2024-08-08\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDiabet\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDiabet\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2024-08-08\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"E11.9\",\r\n                            \"display\": \"E11.9 - Инсулиннезависимый сахарный диабет без осложнений\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2024-08-08\",\r\n                \"recordedDate\": \"2024-08-08\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificate\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AgeOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgeOfDeath\",\r\n                                    \"code\": \"02\",\r\n                                    \"display\": \"умер в возрасте 0-6 суток\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                                    \"code\": \"5170301729728235\",\r\n                                                    \"display\": \"Проспект Партизанский, 83\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                        \"valueString\": \"кв. 11\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceOutsideOrganization\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeathByCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/PlaceOfDeathByCode\",\r\n                                            \"code\": \"5\",\r\n                                            \"display\": \"дома\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeath\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EstablishmentOfCauseOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EstablishmentOfCauseOfDeath\",\r\n                                    \"code\": \"3\",\r\n                                    \"display\": \"вскрытия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"system\": \"https://minzdrav.gov.by\",\r\n                        \"value\": \"{{docIdentifier}}\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Поликлиника №5\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"in-progress\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                },\r\n                \"date\": \"2026-02-05T15:35:21Z\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"finding\": [\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"DirectlyDeathReason\",\r\n                                        \"display\": \"Непосредственная причина смерти (мертворождения) - заболевание или состояние, непосредственно приведшее к смерти\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDepression\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"MotherDeathCondition\",\r\n                                        \"display\": \"Основное заболевание или состояние матери (последа), оказавшее неблагоприятное влияние на ребенка (плод)\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDiabet\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"RelatedPerson/f60d152a-9c19-402a-92a2-5ad32eb0eab7\",\r\n            \"resource\": {\r\n                \"resourceType\": \"RelatedPerson\",\r\n                \"id\": \"f60d152a-9c19-402a-92a2-5ad32eb0eab7\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/RelatedPersonPermanentBy\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551471A009PB1\",\r\n                        \"period\": {\r\n                            \"start\": \"2020-01-31\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"patient\": {\r\n                    \"reference\": \"Patient/{{patientId}}\"\r\n                },\r\n                \"relationship\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/RelatedPersonType\",\r\n                                \"code\": \"mother\",\r\n                                \"display\": \"мать\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Аврелий\",\r\n                        \"given\": [\r\n                            \"Ирина\",\r\n                            \"Владимировна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"+375172000669\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1992-10-08\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$validate",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$validate"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Подписание пакета",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "let responseJson = pm.response.json();\r",
                  "pm.environment.set(\"cmsValue\", responseJson.cms);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "const CryptoJS = require('crypto-js');\r",
                  "const data_raw1 = pm.environment.get('data_raw1');\r",
                  "const data_base64 = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(data_raw1));\r",
                  "pm.environment.set('data_base64', data_base64);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"data\": \"{{data_base64}}\",\r\n    \"isDetached\": \"false\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "http://localhost:8084/sign",
              "protocol": "http",
              "host": [
                "localhost"
              ],
              "port": "8084",
              "path": [
                "sign"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Импорт подписанного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/cms",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "\"{{cmsValue}}\"",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данных",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия сведений предварительного врачебного свидетельства о смерти",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=in-progress",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "in-progress"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод получения идентификатора электронного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const response = pm.response.json();\r",
                  "const identifier = response.parameter.find(t => t.name === \"identifier\").valueString;\r",
                  "\r",
                  "const identifierValue = identifier.split('-')[2];\r",
                  "pm.collectionVariables.set(\"docIdentifier\", identifier);\r",
                  "pm.collectionVariables.set(\"docIdentifierValue\", identifierValue);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Parameters\",\r\n    \"parameter\": [\r\n        {\r\n            \"name\": \"document-code\",\r\n            \"valueCoding\": {\r\n                \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                \"code\": \"03\"\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/$get-document-id",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "$get-document-id"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Валидация пакета данных",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "var compressedBundle = pm.request.body.raw;\r",
                  "\r",
                  "let organizationId = pm.environment.get(\"OrganizationId\");\r",
                  "let practitionerId = pm.environment.get(\"PractitionerId\");\r",
                  "let practitionerRole = pm.environment.get(\"PractitionerRole\");\r",
                  "let practitionerRoleHeadId = pm.environment.get(\"PractitionerRoleHeadId\");\r",
                  "let patientId = pm.collectionVariables.get(\"patientId\");\r",
                  "let randomId = pm.variables.replaceIn(\"{{$guid}}\");\r",
                  "let docIdentifier = pm.environment.get(\"docIdentifier\") || pm.collectionVariables.get(\"docIdentifier\") || \"\";\r",
                  "\r",
                  "compressedBundle = compressedBundle\r",
                  "    .replace(/{{OrganizationId}}/g, organizationId)\r",
                  "    .replace(/{{PractitionerId}}/g, practitionerId)    \r",
                  "    .replace(/{{PractitionerRole}}/g, practitionerRole)\r",
                  "    .replace(/{{randomGuid}}/g, randomId)\r",
                  "    .replace(/{{patientId}}/g, patientId)\r",
                  "    .replace(/{{PractitionerRoleHeadId}}/g, practitionerRoleHeadId)\r",
                  "    .replace(/{{randomValue}}/g, Math.random().toString().replace(\".\",\"\"))\r",
                  "    .replace(/{{docIdentifier}}/g, docIdentifier);\r",
                  "\r",
                  "compressedBundle = JSON.stringify(JSON.parse(compressedBundle));\r",
                  "pm.collectionVariables.set(\"compressedBundle\", compressedBundle);\r",
                  "pm.environment.set(\"data_raw1\", compressedBundle);\r",
                  "\r",
                  "console.log(compressedBundle)"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleDeathCertificateWithoutSection\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/BundleDeathCertificate\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://minzdrav.gov.by\",\r\n        \"value\": \"{{docIdentifier}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-05-05T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-05-05T05:35:21Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificateComposition\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"death-conclusion\",\r\n                            \"display\": \"Врачебное свидетельство о смерти\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-05-05T05:35:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Врач-терапевт участковый, Филатов Олег Михайлович\"\r\n                    }\r\n                ],\r\n                \"title\": \"Электронное врачебное свидетельство о смерти\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\",\r\n                    \"display\": \"Поликлиника №5\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Provenance/ExampleProvenanceDocumentInfoDeath\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"RelatedPerson/f60d152a-9c19-402a-92a2-5ad32eb0eab7\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleDeadPatientED\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"ExampleDeadPatientED\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientED\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DocumentKind\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                                    \"code\": \"03\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551509A009PB3\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Семёнов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Иванович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"2026-02-01\",\r\n                \"deceasedDateTime\": \"2026-02-05T14:10:00Z\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ],\r\n                \"link\": [\r\n                    {\r\n                        \"other\": {\r\n                            \"reference\": \"Patient/{{patientId}}\"\r\n                        },\r\n                        \"type\": \"refer\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Provenance/ExampleProvenanceDocumentInfoDeath\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Provenance\",\r\n                \"id\": \"ExampleProvenanceDocumentInfoDeath\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ProvenanceDocumentInfoDeath\"\r\n                    ]\r\n                },\r\n                \"target\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"recorded\": \"2026-02-05\",\r\n                \"agent\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"organization\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Открытое акционерное общество \\\"Агентство сервисизации и реинжиниринга\\\"\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitioner\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                            \"display\": \"Филатов Игорь Петрович\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitionerRole\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\",\r\n                            \"display\": \"Врач-кардиохирург\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDepression\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDepression\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2024-08-08\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"F32.0\",\r\n                            \"display\": \"F32.0 - Депрессивный эпизод легкой степени\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2024-08-08\",\r\n                \"recordedDate\": \"2024-08-08\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDiabet\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDiabet\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2024-08-08\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"E11.9\",\r\n                            \"display\": \"E11.9 - Инсулиннезависимый сахарный диабет без осложнений\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2024-08-08\",\r\n                \"recordedDate\": \"2024-08-08\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificate\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AgeOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgeOfDeath\",\r\n                                    \"code\": \"02\",\r\n                                    \"display\": \"умер в возрасте 0-6 суток\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                                    \"code\": \"5170301729728235\",\r\n                                                    \"display\": \"Проспект Партизанский, 83\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                        \"valueString\": \"кв. 11\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceOutsideOrganization\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeathByCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/PlaceOfDeathByCode\",\r\n                                            \"code\": \"5\",\r\n                                            \"display\": \"дома\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeath\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EstablishmentOfCauseOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EstablishmentOfCauseOfDeath\",\r\n                                    \"code\": \"3\",\r\n                                    \"display\": \"вскрытия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"system\": \"https://minzdrav.gov.by\",\r\n                        \"value\": \"{{docIdentifier}}\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Поликлиника №5\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                },\r\n                \"date\": \"2026-02-05T15:35:21Z\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"finding\": [\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"DirectlyDeathReason\",\r\n                                        \"display\": \"Непосредственная причина смерти (мертворождения) - заболевание или состояние, непосредственно приведшее к смерти\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDepression\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"MotherDeathCondition\",\r\n                                        \"display\": \"Основное заболевание или состояние матери (последа), оказавшее неблагоприятное влияние на ребенка (плод)\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDiabet\"\r\n                            }\r\n                        }\r\n                    }\r\n                    \r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"RelatedPerson/f60d152a-9c19-402a-92a2-5ad32eb0eab7\",\r\n            \"resource\": {\r\n                \"resourceType\": \"RelatedPerson\",\r\n                \"id\": \"f60d152a-9c19-402a-92a2-5ad32eb0eab7\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/RelatedPersonPermanentBy\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551471A009PB1\",\r\n                        \"period\": {\r\n                            \"start\": \"2020-01-31\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"patient\": {\r\n                    \"reference\": \"Patient/{{patientId}}\"\r\n                },\r\n                \"relationship\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/RelatedPersonType\",\r\n                                \"code\": \"mother\",\r\n                                \"display\": \"мать\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Аврелий\",\r\n                        \"given\": [\r\n                            \"Ирина\",\r\n                            \"Владимировна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"+375172000669\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1992-10-08\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$validate",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$validate"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Подписание пакета",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "let responseJson = pm.response.json();\r",
                  "pm.environment.set(\"cmsValue\", responseJson.cms);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "const CryptoJS = require('crypto-js');\r",
                  "const data_raw1 = pm.environment.get('data_raw1');\r",
                  "const data_base64 = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(data_raw1));\r",
                  "pm.environment.set('data_base64', data_base64);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"data\": \"{{data_base64}}\",\r\n    \"isDetached\": \"false\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "http://localhost:8084/sign",
              "protocol": "http",
              "host": [
                "localhost"
              ],
              "port": "8084",
              "path": [
                "sign"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Импорт подписанного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/cms",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "\"{{cmsValue}}\"",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данных",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "content-type",
                "value": "application/cms",
                "type": "text",
                "disabled": true
              }
            ],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия сведений окончательного врачебного свидетельства о смерти",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=completed",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "completed"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 3. Создание окончательного ЭВСС. (Смерть в организации здравоохранения, без вскрытия)",
      "item": [
        {
          "name": "предварительные условия",
          "item": [
            {
              "name": "создание пациента",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                      "    pm.response.to.have.status(202);\r",
                      "});\r",
                      "\r",
                      "var jsonData = pm.response.json();\r",
                      "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                      "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                      "\r",
                      "console.log(statusReference.valueReference.reference);\r",
                      "\r",
                      "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                      "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                },
                {
                  "listen": "prerequest",
                  "script": {
                    "exec": [
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Fhir-By-Version",
                    "value": "active",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient3\",\r\n                        \"display\": \"Евдокимова Л.И.\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Филатов И.А.\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"Patient3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551442A009PB5\"\r\n                    }\r\n                \r\n                    \r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Евдокимова\",\r\n                        \"given\": [\r\n                            \"Людмила\",\r\n                            \"Ивановна\"\r\n                        ]\r\n                    }\r\n                ],\r\n              \r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1996-02-28\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ],\r\n                \"contact\": [\r\n                    {\r\n                        \"name\": {\r\n                            \"family\": \"Петров\",\r\n                            \"given\": [\r\n                                \"Иван\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"80299099090\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Bundle",
                    "$import"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "получение статуса импорта пакета медицинских данных",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Bundle",
                    "{{bundleId}}",
                    "$status"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "поиск пациента по идентификационному номеру",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "var jsonData = pm.response.json();\r",
                      "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                      "\r",
                      "pm.collectionVariables.set(\"patientId\", patientId);\r",
                      "console.log(patientId)\r",
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551442A009PB5",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Patient"
                  ],
                  "query": [
                    {
                      "key": "identifier",
                      "value": "7551442A009PB5"
                    }
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Метод импорта пакета медицинской информации (указание даты смерти пациента)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"Patient3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551442A009PB5\"\r\n                    }\r\n                    \r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Евдокимова\",\r\n                        \"given\": [\r\n                            \"Людмила\",\r\n                            \"Ивановна\"\r\n                        ]\r\n                    }\r\n                ],\r\n              \r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1996-02-28\",\r\n                \"deceasedDateTime\": \"2026-02-12T14:10:00Z\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ],\r\n                \"contact\": [\r\n                    {\r\n                        \"name\": {\r\n                            \"family\": \"Петров\",\r\n                            \"given\": [\r\n                                \"Иван\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"80299099090\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данныx",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод поиск пациента по идентификационному номеру (указана дата смерти)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"patientId\", patientId);\r",
                  "console.log(patientId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551442A009PB5",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient"
              ],
              "query": [
                {
                  "key": "identifier",
                  "value": "7551442A009PB5"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки отсутствия сведений заключительного врачебного свидетельства о смерти",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=completed",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "completed"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод получения идентификатора электронного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const response = pm.response.json();\r",
                  "const identifier = response.parameter.find(t => t.name === \"identifier\").valueString;\r",
                  "\r",
                  "const identifierValue = identifier.split('-')[2];\r",
                  "pm.collectionVariables.set(\"docIdentifier\", identifier);\r",
                  "pm.collectionVariables.set(\"docIdentifierValue\", identifierValue);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Parameters\",\r\n    \"parameter\": [\r\n        {\r\n            \"name\": \"document-code\",\r\n            \"valueCoding\": {\r\n                \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                \"code\": \"03\"\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/$get-document-id",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "$get-document-id"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Валидация пакета данных",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "var compressedBundle = pm.request.body.raw;\r",
                  "\r",
                  "let organizationId = pm.environment.get(\"OrganizationId\");\r",
                  "let practitionerId = pm.environment.get(\"PractitionerId\");\r",
                  "let practitionerRole = pm.environment.get(\"PractitionerRole\");\r",
                  "let practitionerRoleHeadId = pm.environment.get(\"PractitionerRoleHeadId\");\r",
                  "let patientId = pm.collectionVariables.get(\"patientId\");\r",
                  "let randomId = pm.variables.replaceIn(\"{{$guid}}\");\r",
                  "let docIdentifier = pm.environment.get(\"docIdentifier\") || pm.collectionVariables.get(\"docIdentifier\") || \"\";\r",
                  "\r",
                  "compressedBundle = compressedBundle\r",
                  "    .replace(/{{OrganizationId}}/g, organizationId)\r",
                  "    .replace(/{{PractitionerId}}/g, practitionerId)    \r",
                  "    .replace(/{{PractitionerRole}}/g, practitionerRole)\r",
                  "    .replace(/{{randomGuid}}/g, randomId)\r",
                  "    .replace(/{{patientId}}/g, patientId)\r",
                  "    .replace(/{{PractitionerRoleHeadId}}/g, practitionerRoleHeadId)\r",
                  "    .replace(/{{randomValue}}/g, Math.random().toString().replace(\".\",\"\"))\r",
                  "    .replace(/{{docIdentifier}}/g, docIdentifier);\r",
                  "\r",
                  "compressedBundle = JSON.stringify(JSON.parse(compressedBundle));\r",
                  "pm.collectionVariables.set(\"compressedBundle\", compressedBundle);\r",
                  "pm.environment.set(\"data_raw1\", compressedBundle);\r",
                  "\r",
                  "console.log(compressedBundle)"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleDeathCertificateWithoutSection\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/BundleDeathCertificate\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://minzdrav.gov.by\",\r\n        \"value\": \"{{docIdentifier}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-05-05T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-05-05T05:35:21Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificateComposition\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"death-conclusion\",\r\n                            \"display\": \"Врачебное свидетельство о смерти\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-05-05T05:35:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Врач-терапевт участковый, Филатов Олег Михайлович\"\r\n                    }\r\n                ],\r\n                \"title\": \"Электронное врачебное свидетельство о смерти\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\",\r\n                    \"display\": \"Поликлиника №5\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Provenance/ExampleProvenanceDocumentInfoDeath\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisDiabet\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleDeadPatientED\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"ExampleDeadPatientED\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientED\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DocumentKind\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                                    \"code\": \"03\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551442A009PB5\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Евдокимова\",\r\n                        \"given\": [\r\n                            \"Людмила\",\r\n                            \"Ивановна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1996-02-28\",\r\n                \"deceasedDateTime\": \"2026-02-12T14:10:00Z\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.91\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.109\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г. Могилев, Переулок Снежный\",\r\n                        \"line\": [\r\n                            \"Переулок Снежный\"\r\n                        ],\r\n                        \"city\": \"г. Могилев\",\r\n                        \"state\": \"Могилевская область\",\r\n                        \"country\": \"Беларусь\"\r\n                    }\r\n                ],\r\n                \"link\": [\r\n                    {\r\n                        \"other\": {\r\n                            \"reference\": \"Patient/{{patientId}}\"\r\n                        },\r\n                        \"type\": \"refer\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDepression\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDepression\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I50.0\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDiabet\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDiabet\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I25.2\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisVeins05\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisVeins05\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I25.1\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisVeins\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisVeins\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"C61\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Provenance/ExampleProvenanceDocumentInfoDeath\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Provenance\",\r\n                \"id\": \"ExampleProvenanceDocumentInfoDeath\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ProvenanceDocumentInfoDeath\"\r\n                    ]\r\n                },\r\n                \"target\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"recorded\": \"2026-02-05\",\r\n                \"agent\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"organization\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Открытое акционерное общество \\\"Агентство сервисизации и реинжиниринга\\\"\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitioner\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                            \"display\": \"Филатов Игорь Петрович\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitionerRole\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\",\r\n                            \"display\": \"Врач-кардиохирург\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificate\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AgeOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgeOfDeath\",\r\n                                    \"code\": \"04\",\r\n                                    \"display\": \"умер в возрасте старше года\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceInMedicalOrganization\",\r\n                                \"valueReference\": {\r\n                                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeathByCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/PlaceOfDeathByCode\",\r\n                                            \"code\": \"3\",\r\n                                            \"display\": \"в организации здравоохранения, оказывающей медицинскую помощь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeath\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EstablishmentOfCauseOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EstablishmentOfCauseOfDeath\",\r\n                                    \"code\": \"3\",\r\n                                    \"display\": \"вскрытия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"system\": \"https://minzdrav.gov.by\",\r\n                        \"value\": \"{{docIdentifier}}\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Поликлиника №5\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                },\r\n                \"date\": \"2026-02-12T05:35:21Z\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"finding\": [\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"DirectlyDeathReason\",\r\n                                        \"display\": \"Непосредственная причина смерти (мертворождения) - заболевание или состояние, непосредственно приведшее к смерти\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDepression\",\r\n                                \"display\": \"I50.0 - Застойная сердечная недостаточность\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"ConditionsForDirectlyDeathReason\",\r\n                                        \"display\": \"Патологические состояния (заболевания), вызвавшие или обусловившие непосредственную причину смерти (мертворождения)\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDiabet\",\r\n                                \"display\": \"I25.2 - Перенесенный в прошлом инфаркт миокарда\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"MainDeathReason\"\r\n                                    \r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisVeins05\",\r\n                                \"display\": \"I25.1 - Атеросклеротическая болезнь сердца\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"OtherCondition\"\r\n                                       \r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisVeins\"\r\n                               \r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$validate",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$validate"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Подписание пакета",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "let responseJson = pm.response.json();\r",
                  "pm.environment.set(\"cmsValue\", responseJson.cms);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "const CryptoJS = require('crypto-js');\r",
                  "const data_raw1 = pm.environment.get('data_raw1');\r",
                  "const data_base64 = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(data_raw1));\r",
                  "pm.environment.set('data_base64', data_base64);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"data\": \"{{data_base64}}\",\r\n    \"isDetached\": \"false\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "http://localhost:8084/sign",
              "protocol": "http",
              "host": [
                "localhost"
              ],
              "port": "8084",
              "path": [
                "sign"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Импорт подписанного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/cms",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "\"{{cmsValue}}\"",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данных",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия сведений заключительного врачебного свидетельства о смерти",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=completed",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "completed"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 4. Создание окончательного ЭВСС с ошибкой. Создание нового окончательного ЭВСС. (Смерть беременной в организации здравоохранения, со вскрытием)",
      "item": [
        {
          "name": "предварительные условия",
          "item": [
            {
              "name": "создание пациента",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                      "    pm.response.to.have.status(202);\r",
                      "});\r",
                      "\r",
                      "var jsonData = pm.response.json();\r",
                      "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                      "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                      "\r",
                      "console.log(statusReference.valueReference.reference);\r",
                      "\r",
                      "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                      "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                },
                {
                  "listen": "prerequest",
                  "script": {
                    "exec": [
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Fhir-By-Version",
                    "value": "active",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient3\",\r\n                        \"display\": \"Евдокимова Л.И.\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Филатов И.А.\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"Patient3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551390A009PB3\"\r\n                    }\r\n                \r\n                    \r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Евдокимова\",\r\n                        \"given\": [\r\n                            \"Людмила\",\r\n                            \"Ивановна\"\r\n                        ]\r\n                    }\r\n                ],\r\n              \r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1996-02-28\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ],\r\n                \"contact\": [\r\n                    {\r\n                        \"name\": {\r\n                            \"family\": \"Петров\",\r\n                            \"given\": [\r\n                                \"Иван\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"80299099090\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Bundle",
                    "$import"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "получение статуса импорта пакета медицинских данных",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Bundle",
                    "{{bundleId}}",
                    "$status"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "поиск пациента по идентификационному номеру",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "var jsonData = pm.response.json();\r",
                      "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                      "\r",
                      "pm.collectionVariables.set(\"patientId\", patientId);\r",
                      "console.log(patientId)\r",
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551390A009PB3",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Patient"
                  ],
                  "query": [
                    {
                      "key": "identifier",
                      "value": "7551390A009PB3"
                    }
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Метод импорта пакета медицинской информации (указание даты смерти пациента)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"Patient3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551390A009PB3\"\r\n                    }\r\n                    \r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Евдокимова\",\r\n                        \"given\": [\r\n                            \"Людмила\",\r\n                            \"Ивановна\"\r\n                        ]\r\n                    }\r\n                ],\r\n              \r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1996-02-28\",\r\n                \"deceasedDateTime\": \"2026-02-12T14:10:00Z\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ],\r\n                \"contact\": [\r\n                    {\r\n                        \"name\": {\r\n                            \"family\": \"Петров\",\r\n                            \"given\": [\r\n                                \"Иван\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"80299099090\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данныx",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод поиск пациента по идентификационному номеру (указана дата смерти)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"patientId\", patientId);\r",
                  "console.log(patientId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551390A009PB3",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient"
              ],
              "query": [
                {
                  "key": "identifier",
                  "value": "7551390A009PB3"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки отсутствия сведений заключительного врачебного свидетельства о смерти",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=completed",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "completed"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод получения идентификатора электронного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const response = pm.response.json();\r",
                  "const identifier = response.parameter.find(t => t.name === \"identifier\").valueString;\r",
                  "\r",
                  "const identifierValue = identifier.split('-')[2];\r",
                  "pm.collectionVariables.set(\"docIdentifier\", identifier);\r",
                  "pm.collectionVariables.set(\"docIdentifierValue\", identifierValue);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Parameters\",\r\n    \"parameter\": [\r\n        {\r\n            \"name\": \"document-code\",\r\n            \"valueCoding\": {\r\n                \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                \"code\": \"03\"\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/$get-document-id",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "$get-document-id"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Валидация пакета данных",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "var compressedBundle = pm.request.body.raw;\r",
                  "\r",
                  "let organizationId = pm.environment.get(\"OrganizationId\");\r",
                  "let practitionerId = pm.environment.get(\"PractitionerId\");\r",
                  "let practitionerRole = pm.environment.get(\"PractitionerRole\");\r",
                  "let practitionerRoleHeadId = pm.environment.get(\"PractitionerRoleHeadId\");\r",
                  "let patientId = pm.collectionVariables.get(\"patientId\");\r",
                  "let randomId = pm.variables.replaceIn(\"{{$guid}}\");\r",
                  "let docIdentifier = pm.environment.get(\"docIdentifier\") || pm.collectionVariables.get(\"docIdentifier\") || \"\";\r",
                  "\r",
                  "compressedBundle = compressedBundle\r",
                  "    .replace(/{{OrganizationId}}/g, organizationId)\r",
                  "    .replace(/{{PractitionerId}}/g, practitionerId)    \r",
                  "    .replace(/{{PractitionerRole}}/g, practitionerRole)\r",
                  "    .replace(/{{randomGuid}}/g, randomId)\r",
                  "    .replace(/{{patientId}}/g, patientId)\r",
                  "    .replace(/{{PractitionerRoleHeadId}}/g, practitionerRoleHeadId)\r",
                  "    .replace(/{{randomValue}}/g, Math.random().toString().replace(\".\",\"\"))\r",
                  "    .replace(/{{docIdentifier}}/g, docIdentifier);\r",
                  "\r",
                  "compressedBundle = JSON.stringify(JSON.parse(compressedBundle));\r",
                  "pm.collectionVariables.set(\"compressedBundle\", compressedBundle);\r",
                  "pm.environment.set(\"data_raw1\", compressedBundle);\r",
                  "\r",
                  "console.log(compressedBundle)"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleDeathCertificateWithoutSection\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/BundleDeathCertificate\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://minzdrav.gov.by\",\r\n        \"value\": \"{{docIdentifier}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-05-05T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-05-05T05:35:21Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificateComposition\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"death-conclusion\",\r\n                            \"display\": \"Врачебное свидетельство о смерти\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-05-05T05:35:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Врач-терапевт участковый, Филатов Олег Михайлович\"\r\n                    }\r\n                ],\r\n                \"title\": \"Электронное врачебное свидетельство о смерти\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\",\r\n                    \"display\": \"Поликлиника №5\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Provenance/ExampleProvenanceDocumentInfoDeath\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisDepression\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleDeadPatientED\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"ExampleDeadPatientED\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientED\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DocumentKind\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                                    \"code\": \"03\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551390A009PB3\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Евдокимова\",\r\n                        \"given\": [\r\n                            \"Людмила\",\r\n                            \"Ивановна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1996-02-28\",\r\n                \"deceasedDateTime\": \"2026-02-12T14:10:00Z\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.91\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.109\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г. Могилев, Переулок Снежный\",\r\n                        \"line\": [\r\n                            \"Переулок Снежный\"\r\n                        ],\r\n                        \"city\": \"г. Могилев\",\r\n                        \"state\": \"Могилевская область\",\r\n                        \"country\": \"Беларусь\"\r\n                    }\r\n                ],\r\n                \"link\": [\r\n                    {\r\n                        \"other\": {\r\n                            \"reference\": \"Patient/{{patientId}}\"\r\n                        },\r\n                        \"type\": \"refer\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Provenance/ExampleProvenanceDocumentInfoDeath\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Provenance\",\r\n                \"id\": \"ExampleProvenanceDocumentInfoDeath\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ProvenanceDocumentInfoDeath\"\r\n                    ]\r\n                },\r\n                \"target\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"recorded\": \"2026-02-12\",\r\n                \"agent\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"organization\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Открытое акционерное общество \\\"Агентство сервисизации и реинжиниринга\\\"\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitioner\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                            \"display\": \"Филатов Игорь Петрович\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitionerRole\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\",\r\n                            \"display\": \"Врач-кардиохирург\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDepression\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDepression\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I50.0\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDiabet\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDiabet\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I25.2\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisVeins05\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisVeins05\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I25.1\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificate\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AgeOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgeOfDeath\",\r\n                                    \"code\": \"04\",\r\n                                    \"display\": \"умер в возрасте старше года\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/DuringPregnancy\",\r\n                                \"valueBoolean\": false\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/DuringChildbirth\",\r\n                                \"valueBoolean\": false\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/DayAfterChildBirth\",\r\n                                \"valuePositiveInt\": 6\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DeathDuringChildbirth\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceInMedicalOrganization\",\r\n                                \"valueReference\": {\r\n                                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeathByCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/PlaceOfDeathByCode\",\r\n                                            \"code\": \"3\",\r\n                                            \"display\": \"в организации здравоохранения, оказывающей медицинскую помощь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeath\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EstablishmentOfCauseOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EstablishmentOfCauseOfDeath\",\r\n                                    \"code\": \"3\",\r\n                                    \"display\": \"вскрытия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"system\": \"https://minzdrav.gov.by\",\r\n                        \"value\": \"{{docIdentifier}}\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Поликлиника №5\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                },\r\n                \"date\": \"2026-02-12T05:35:21Z\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"finding\": [\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"DirectlyDeathReason\",\r\n                                        \"display\": \"Непосредственная причина смерти (мертворождения) - заболевание или состояние, непосредственно приведшее к смерти\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDepression\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"ConditionsForDirectlyDeathReason\",\r\n                                        \"display\": \"Патологические состояния (заболевания), вызвавшие или обусловившие непосредственную причину смерти (мертворождения)\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDiabet\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"MainDeathReason\",\r\n                                        \"display\": \"Основная причина смерти (мертворождения) - первоначальное заболевание или состояние\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisVeins05\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$validate",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$validate"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Подписание пакета",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "let responseJson = pm.response.json();\r",
                  "pm.environment.set(\"cmsValue\", responseJson.cms);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "const CryptoJS = require('crypto-js');\r",
                  "const data_raw1 = pm.environment.get('data_raw1');\r",
                  "const data_base64 = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(data_raw1));\r",
                  "pm.environment.set('data_base64', data_base64);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"data\": \"{{data_base64}}\",\r\n    \"isDetached\": \"false\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "http://localhost:8084/sign",
              "protocol": "http",
              "host": [
                "localhost"
              ],
              "port": "8084",
              "path": [
                "sign"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Импорт подписанного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/cms",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "\"{{cmsValue}}\"",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данных",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия сведений заключительного врачебного свидетельства о смерти",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=completed",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "completed"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Отмена импорта пакета медицинских данных",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$cancel",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$cancel"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данных",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки отсутствия сведений заключительного врачебного свидетельства о смерти",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=completed",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "completed"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод получения идентификатора электронного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const response = pm.response.json();\r",
                  "const identifier = response.parameter.find(t => t.name === \"identifier\").valueString;\r",
                  "\r",
                  "const identifierValue = identifier.split('-')[2];\r",
                  "pm.collectionVariables.set(\"docIdentifier\", identifier);\r",
                  "pm.collectionVariables.set(\"docIdentifierValue\", identifierValue);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Parameters\",\r\n    \"parameter\": [\r\n        {\r\n            \"name\": \"document-code\",\r\n            \"valueCoding\": {\r\n                \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                \"code\": \"03\"\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/$get-document-id",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "$get-document-id"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Валидация пакета данных",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "var compressedBundle = pm.request.body.raw;\r",
                  "\r",
                  "let organizationId = pm.environment.get(\"OrganizationId\");\r",
                  "let practitionerId = pm.environment.get(\"PractitionerId\");\r",
                  "let practitionerRole = pm.environment.get(\"PractitionerRole\");\r",
                  "let practitionerRoleHeadId = pm.environment.get(\"PractitionerRoleHeadId\");\r",
                  "let patientId = pm.collectionVariables.get(\"patientId\");\r",
                  "let randomId = pm.variables.replaceIn(\"{{$guid}}\");\r",
                  "let docIdentifier = pm.environment.get(\"docIdentifier\") || pm.collectionVariables.get(\"docIdentifier\") || \"\";\r",
                  "\r",
                  "compressedBundle = compressedBundle\r",
                  "    .replace(/{{OrganizationId}}/g, organizationId)\r",
                  "    .replace(/{{PractitionerId}}/g, practitionerId)    \r",
                  "    .replace(/{{PractitionerRole}}/g, practitionerRole)\r",
                  "    .replace(/{{randomGuid}}/g, randomId)\r",
                  "    .replace(/{{patientId}}/g, patientId)\r",
                  "    .replace(/{{PractitionerRoleHeadId}}/g, practitionerRoleHeadId)\r",
                  "    .replace(/{{randomValue}}/g, Math.random().toString().replace(\".\",\"\"))\r",
                  "    .replace(/{{docIdentifier}}/g, docIdentifier);\r",
                  "\r",
                  "compressedBundle = JSON.stringify(JSON.parse(compressedBundle));\r",
                  "pm.collectionVariables.set(\"compressedBundle\", compressedBundle);\r",
                  "pm.environment.set(\"data_raw1\", compressedBundle);\r",
                  "\r",
                  "console.log(compressedBundle)"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleDeathCertificateWithoutSection\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/BundleDeathCertificate\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://minzdrav.gov.by\",\r\n        \"value\": \"{{docIdentifier}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-05-05T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-05-05T05:35:21Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificateComposition\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"death-conclusion\",\r\n                            \"display\": \"Врачебное свидетельство о смерти\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-05-05T05:35:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Врач-терапевт участковый, Филатов Олег Михайлович\"\r\n                    }\r\n                ],\r\n                \"title\": \"Электронное врачебное свидетельство о смерти\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\",\r\n                    \"display\": \"Поликлиника №5\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Provenance/ExampleProvenanceDocumentInfoDeath\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisDepression\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleDeadPatientED\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"ExampleDeadPatientED\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientED\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DocumentKind\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                                    \"code\": \"03\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551390A009PB3\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Евдокимова\",\r\n                        \"given\": [\r\n                            \"Людмила\",\r\n                            \"Ивановна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1996-02-28\",\r\n                \"deceasedDateTime\": \"2026-02-12T14:10:00Z\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.91\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.109\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г. Могилев, Переулок Снежный\",\r\n                        \"line\": [\r\n                            \"Переулок Снежный\"\r\n                        ],\r\n                        \"city\": \"г. Могилев\",\r\n                        \"state\": \"Могилевская область\",\r\n                        \"country\": \"Беларусь\"\r\n                    }\r\n                ],\r\n                \"link\": [\r\n                    {\r\n                        \"other\": {\r\n                            \"reference\": \"Patient/{{patientId}}\"\r\n                        },\r\n                        \"type\": \"refer\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Provenance/ExampleProvenanceDocumentInfoDeath\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Provenance\",\r\n                \"id\": \"ExampleProvenanceDocumentInfoDeath\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ProvenanceDocumentInfoDeath\"\r\n                    ]\r\n                },\r\n                \"target\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                    }\r\n                ],\r\n                \"recorded\": \"2026-02-12\",\r\n                \"agent\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"organization\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Открытое акционерное общество \\\"Агентство сервисизации и реинжиниринга\\\"\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitioner\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                            \"display\": \"Филатов Игорь Петрович\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitionerRole\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\",\r\n                            \"display\": \"Врач-кардиохирург\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDepression\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDepression\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I50.0\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDiabet\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDiabet\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I25.2\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisVeins05\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisVeins05\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2026-02-12\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I25.5\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2026-02-12\",\r\n                \"recordedDate\": \"2026-02-12\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleDeathCertificateWithoutSection\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleDeathCertificateWithoutSection\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DeathCertificate\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AgeOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgeOfDeath\",\r\n                                    \"code\": \"04\",\r\n                                    \"display\": \"умер в возрасте старше года\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceInMedicalOrganization\",\r\n                                \"valueReference\": {\r\n                                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeathByCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/PlaceOfDeathByCode\",\r\n                                            \"code\": \"3\",\r\n                                            \"display\": \"в организации здравоохранения, оказывающей медицинскую помощь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeath\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/DuringPregnancy\",\r\n                                \"valueBoolean\": false\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/DuringChildbirth\",\r\n                                \"valueBoolean\": false\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/DayAfterChildBirth\",\r\n                                \"valuePositiveInt\": 6\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DeathDuringChildbirth\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EstablishmentOfCauseOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EstablishmentOfCauseOfDeath\",\r\n                                    \"code\": \"3\",\r\n                                    \"display\": \"вскрытия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"system\": \"https://minzdrav.gov.by\",\r\n                        \"value\": \"{{docIdentifier}}\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Поликлиника №5\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleDeadPatientED\"\r\n                },\r\n                \"date\": \"2026-02-12T05:35:21Z\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"finding\": [\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"DirectlyDeathReason\",\r\n                                        \"display\": \"Непосредственная причина смерти (мертворождения) - заболевание или состояние, непосредственно приведшее к смерти\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDepression\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"ConditionsForDirectlyDeathReason\",\r\n                                        \"display\": \"Патологические состояния (заболевания), вызвавшие или обусловившие непосредственную причину смерти (мертворождения)\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDiabet\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"MainDeathReason\",\r\n                                        \"display\": \"Основная причина смерти (мертворождения) - первоначальное заболевание или состояние\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisVeins05\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$validate",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$validate"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Подписание пакета",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "let responseJson = pm.response.json();\r",
                  "pm.environment.set(\"cmsValue\", responseJson.cms);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "const CryptoJS = require('crypto-js');\r",
                  "const data_raw1 = pm.environment.get('data_raw1');\r",
                  "const data_base64 = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(data_raw1));\r",
                  "pm.environment.set('data_base64', data_base64);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"data\": \"{{data_base64}}\",\r\n    \"isDetached\": \"false\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "http://localhost:8084/sign",
              "protocol": "http",
              "host": [
                "localhost"
              ],
              "port": "8084",
              "path": [
                "sign"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Импорт подписанного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/cms",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "\"{{cmsValue}}\"",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данных",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия сведений заключительного врачебного свидетельства о смерти",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=completed",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "completed"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 5. Создание Электронного врачебного свидетельства о мертворождении.",
      "item": [
        {
          "name": "предварительные условия",
          "item": [
            {
              "name": "создание пациента",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                      "    pm.response.to.have.status(202);\r",
                      "});\r",
                      "\r",
                      "var jsonData = pm.response.json();\r",
                      "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                      "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                      "\r",
                      "console.log(statusReference.valueReference.reference);\r",
                      "\r",
                      "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                      "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                },
                {
                  "listen": "prerequest",
                  "script": {
                    "exec": [
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Fhir-By-Version",
                    "value": "active",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient3\",\r\n                        \"display\": \"Евдокимова Л.И.\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Филатов И.А.\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"Patient3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551062A009PB5\"\r\n                    }\r\n                    \r\n                    \r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Аксенова\",\r\n                        \"given\": [\r\n                            \"Екатерина\",\r\n                            \"Юрьевна\"\r\n                        ]\r\n                    }\r\n                ],\r\n              \r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1988-04-20\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ],\r\n                \"contact\": [\r\n                    {\r\n                        \"name\": {\r\n                            \"family\": \"Петров\",\r\n                            \"given\": [\r\n                                \"Иван\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"80299099090\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Bundle",
                    "$import"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "получение статуса импорта пакета медицинских данных",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Bundle",
                    "{{bundleId}}",
                    "$status"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "поиск пациента по идентификационному номеру",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "var jsonData = pm.response.json();\r",
                      "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                      "\r",
                      "pm.collectionVariables.set(\"patientId\", patientId);\r",
                      "console.log(patientId)\r",
                      ""
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551062A009PB5",
                  "protocol": "{{Schema}}",
                  "host": [
                    "{{Proxy-host}}"
                  ],
                  "path": [
                    "fhir",
                    "Patient"
                  ],
                  "query": [
                    {
                      "key": "identifier",
                      "value": "7551062A009PB5"
                    }
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Метод импорта пакета медицинской информации (указание даты смерти пациента)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"Patient3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551062A009PB5\"\r\n                    }\r\n                    \r\n                    \r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Аксенова\",\r\n                        \"given\": [\r\n                            \"Екатерина\",\r\n                            \"Юрьевна\"\r\n                        ]\r\n                    }\r\n                ],\r\n              \r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1988-04-20\",\r\n                \"deceasedDateTime\": \"2025-05-02T05:35:21Z\",\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"72609920778\",\r\n                                            \"display\": \"Переулок Снежный\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 11\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Могилевская область, г.Могилев, Переулок Гоголя, д.19\",\r\n                        \"postalCode\": \"212011\"\r\n                    }\r\n                ],\r\n                \"contact\": [\r\n                    {\r\n                        \"name\": {\r\n                            \"family\": \"Петров\",\r\n                            \"given\": [\r\n                                \"Иван\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"80299099090\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данныx",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод поиск пациента по идентификационному номеру (указана дата смерти)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"patientId\", patientId);\r",
                  "console.log(patientId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551062A009PB5",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient"
              ],
              "query": [
                {
                  "key": "identifier",
                  "value": "7551062A009PB5"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки отсутствия сведений окончательного врачебного свидетельства о смерти",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/DeathCertificate&status=completed",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/DeathCertificate"
                },
                {
                  "key": "status",
                  "value": "completed"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод получения идентификатора электронного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const response = pm.response.json();\r",
                  "const identifier = response.parameter.find(t => t.name === \"identifier\").valueString;\r",
                  "\r",
                  "const identifierValue = identifier.split('-')[2];\r",
                  "pm.collectionVariables.set(\"docIdentifier\", identifier);\r",
                  "pm.collectionVariables.set(\"docIdentifierValue\", identifierValue);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Parameters\",\r\n    \"parameter\": [\r\n        {\r\n            \"name\": \"document-code\",\r\n            \"valueCoding\": {\r\n                \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                \"code\": \"12\"\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/$get-document-id",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "$get-document-id"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Валидация пакета данных",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "var compressedBundle = pm.request.body.raw;\r",
                  "\r",
                  "let organizationId = pm.environment.get(\"OrganizationId\");\r",
                  "let practitionerId = pm.environment.get(\"PractitionerId\");\r",
                  "let practitionerRole = pm.environment.get(\"PractitionerRole\");\r",
                  "let practitionerRoleHeadId = pm.environment.get(\"PractitionerRoleHeadId\");\r",
                  "let patientId = pm.collectionVariables.get(\"patientId\");\r",
                  "let randomId = pm.variables.replaceIn(\"{{$guid}}\");\r",
                  "let docIdentifier = pm.environment.get(\"docIdentifier\") || pm.collectionVariables.get(\"docIdentifier\") || \"\";\r",
                  "\r",
                  "compressedBundle = compressedBundle\r",
                  "    .replace(/{{OrganizationId}}/g, organizationId)\r",
                  "    .replace(/{{PractitionerId}}/g, practitionerId)    \r",
                  "    .replace(/{{PractitionerRole}}/g, practitionerRole)\r",
                  "    .replace(/{{randomGuid}}/g, randomId)\r",
                  "    .replace(/{{patientId}}/g, patientId)\r",
                  "    .replace(/{{PractitionerRoleHeadId}}/g, practitionerRoleHeadId)\r",
                  "    .replace(/{{randomValue}}/g, Math.random().toString().replace(\".\",\"\"))\r",
                  "    .replace(/{{docIdentifier}}/g, docIdentifier);\r",
                  "\r",
                  "compressedBundle = JSON.stringify(JSON.parse(compressedBundle));\r",
                  "pm.collectionVariables.set(\"compressedBundle\", compressedBundle);\r",
                  "pm.environment.set(\"data_raw1\", compressedBundle);\r",
                  "\r",
                  "console.log(compressedBundle)"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleStillborn\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/BundleStillbirth\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://minzdrav.gov.by\",\r\n        \"value\": \"{{docIdentifier}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2026-02-10T05:35:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/ExampleStillbirthComposition\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"ExampleStillbirthComposition\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2026-02-10T05:35:21Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/StillbirthComposition\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"stillbirth-conclusion\",\r\n                            \"display\": \"Электронное врачебное свидетельство о мертворождении\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleWomenStillbirthED\"\r\n                    }\r\n                ],\r\n                \"date\": \"2026-02-10T05:35:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"Электронное врачебное свидетельство о мертворождении\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Provenance/ExampleProvenanceStillborn\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleStillbirth\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"QuestionnaireResponse/QRMotherSpecialInformation\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisDepression\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisDiabet\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisVeins05\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisVeins\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/ExampleWomenStillbirthED\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"ExampleWomenStillbirthED\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientED\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DocumentKind\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                                    \"code\": \"03\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551062A009PB5\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Аксенова\",\r\n                        \"given\": [\r\n                            \"Екатерина\",\r\n                            \"Юрьевна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"birthDate\": \"1988-04-20\",\r\n                \"deceasedDateTime\": \"2025-05-02T05:35:21Z\",\r\n                \"link\": [\r\n                    {\r\n                        \"other\": {\r\n                            \"reference\": \"Patient/{{patientId}}\"\r\n                        },\r\n                        \"type\": \"refer\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Provenance/ExampleProvenanceStillborn\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Provenance\",\r\n                \"id\": \"ExampleProvenanceDocumentInfoDeath\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ProvenanceDocumentInfoDeath\"\r\n                    ]\r\n                },\r\n                \"target\": [\r\n                    {\r\n                        \"reference\": \"Patient/ExampleWomenStillbirthED\"\r\n                    }\r\n                ],\r\n                \"recorded\": \"2026-02-12\",\r\n                \"agent\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"organization\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\",\r\n                            \"display\": \"Открытое акционерное общество \\\"Агентство сервисизации и реинжиниринга\\\"\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitioner\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                            \"display\": \"Филатов Игорь Петрович\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgentTypeProvenance\",\r\n                                    \"code\": \"practitionerRole\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"who\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\",\r\n                            \"display\": \"Врач-кардиохирург\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDepression\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDepression\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2024-08-08\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"F32.0\",\r\n                            \"display\": \"F32.0 - Депрессивный эпизод легкой степени\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2024-08-08\",\r\n                \"recordedDate\": \"2024-08-08\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisDiabet\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisDiabet\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2024-08-08\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"E11.9\",\r\n                            \"display\": \"E11.9 - Инсулиннезависимый сахарный диабет без осложнений\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2024-08-08\",\r\n                \"recordedDate\": \"2024-08-08\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisVeins05\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisVeins05\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2024-08-08\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I80.0\",\r\n                            \"display\": \"I80.0 - Флебит и тромбофлебит поверхностных сосудов нижних конечностей\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2024-08-08\",\r\n                \"recordedDate\": \"2024-08-08\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisVeins\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisVeins\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2024-08-08\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"I83.9\",\r\n                            \"display\": \"I83.9 - Варикозное расширение вен нижних конечностей без язвы или воспаления\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\",\r\n                    \"display\": \"Петр Сидорович Иванов\"\r\n                },\r\n                \"onsetDateTime\": \"2024-08-08\",\r\n                \"recordedDate\": \"2024-08-08\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleStillbirth\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleStillbirth\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/Stillbirth\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AgeOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AgeOfDeath\",\r\n                                    \"code\": \"02\",\r\n                                    \"display\": \"мертворожденный\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/GenderStillbirth\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/administrative-gender\",\r\n                                    \"code\": \"male\",\r\n                                    \"display\": \"Мужской\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DateTimeStillbirth\",\r\n                        \"valueDateTime\": \"2026-02-09T04:30:21Z\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceInMedicalOrganization\",\r\n                                \"valueReference\": {\r\n                                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeathByCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/PlaceOfDeathByCode\",\r\n                                            \"code\": \"3\",\r\n                                            \"display\": \"в организации здравоохранения, оказывающей медицинскую помощь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PlaceOfDeath\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EstablishmentOfCauseOfDeath\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EstablishmentOfCauseOfDeath\",\r\n                                    \"code\": \"3\",\r\n                                    \"display\": \"вскрытия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"system\": \"https://minzdrav.gov.by\",\r\n                        \"value\": \"{{docIdentifier}}\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/ExampleWomenStillbirthED\"\r\n                },\r\n                \"date\": \"2026-02-10T05:35:21Z\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"finding\": [\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"DirectlyDeathReason\",\r\n                                        \"display\": \"Непосредственная причина смерти (мертворождения) - заболевание или состояние, непосредственно приведшее к смерти\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDepression\",\r\n                                \"display\": \"P20.9 - Внутриутробная гипоксия неуточненная\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"ConditionsForDirectlyDeathReason\",\r\n                                        \"display\": \"Патологические состояния (заболевания), вызвавшие или обусловившие непосредственную причину смерти (мертворождения)\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisDiabet\",\r\n                                \"display\": \"P02.7 - Поражения плода и новорожденного, обусловленные хориоамнионитом\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"MainDeathReason\",\r\n                                        \"display\": \"Основная причина смерти (мертворождения) - первоначальное заболевание или состояние\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisVeins05\",\r\n                                \"display\": \"P02.1 - Поражения плода и новорожденного, обусловленные другими осложнениями, связанными с отделением плаценты и кровотечением\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"OtherCondition\",\r\n                                        \"display\": \"Прочие важные состояния, сопутствующие смерти (мертворождению), но не связанные с заболеванием или патологическим состоянием, приведшим к ней\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisVeins\",\r\n                                \"display\": \"P05.0 - 'Маловесный' для гестационного возраста плод\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"MotherDeathCondition\",\r\n                                        \"display\": \"Основное заболевание или состояние матери (последа), оказавшее неблагоприятное влияние на ребенка (плод)\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisVeins\",\r\n                                \"display\": \"O14.1 - Тяжелая преэклампсия\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"concept\": {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDeathReason\",\r\n                                        \"code\": \"OtherMotherConditions\",\r\n                                        \"display\": \"Другие заболевания или состояния матери (последа), оказавшие неблагоприятное влияние на ребенка (плод)\"\r\n                                    }\r\n                                ]\r\n                            },\r\n                            \"reference\": {\r\n                                \"reference\": \"Condition/ExampleDiagnosisVeins\",\r\n                                \"display\": \"O10.1 - Существовавшая ранее кардиоваскулярная гипертензия, осложняющая беременность, роды и послеродовой период\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"QuestionnaireResponse/QRMotherSpecialInformation\",\r\n            \"resource\": {\r\n                \"resourceType\": \"QuestionnaireResponse\",\r\n                \"id\": \"QRMotherSpecialInformation\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/QRSpecialInformation\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"system\": \"https://minzdrav.gov.by\",\r\n                        \"value\": \"{{docIdentifier}}\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"questionnaire\": \"https://fhir.by/Questionnaire/QMotherSpecialInformation\",\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\"\r\n                },\r\n                \"authored\": \"2026-02-10T05:35:21Z\",\r\n                \"author\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"item\": [\r\n                    {\r\n                        \"linkId\": \"1\",\r\n                        \"text\": \"Образование матери\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueCoding\": {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MotherEducation\",\r\n                                    \"code\": \"high\",\r\n                                    \"display\": \"Высшее\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"2\",\r\n                        \"text\": \"Семейное положение матери\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueCoding\": {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MotherMaritalStatus\",\r\n                                    \"code\": \"married\",\r\n                                    \"display\": \"состоит в браке\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"3\",\r\n                        \"text\": \"Ребенок родился\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueCoding\": {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ConditionsOfBirth\",\r\n                                    \"code\": \"single_birth\",\r\n                                    \"display\": \"при одноплодных родах\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"4\",\r\n                        \"text\": \"Номер настоящей беременности\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueInteger\": 2\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"5\",\r\n                        \"text\": \"Номер настоящих родов\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueInteger\": 2\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"6\",\r\n                        \"text\": \"Дата первого дня последней менструации\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueDate\": \"2025-01-02\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"7\",\r\n                        \"text\": \"Срок настоящей беременности в днях\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueInteger\": 210\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"8\",\r\n                        \"text\": \"Число родившихся живыми детей от беременностей, предшествовавших настоящей\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueInteger\": 1\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"9\",\r\n                        \"text\": \"Число мертворождений, имевших место при предшествовавших беременностях\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueInteger\": 0\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"10\",\r\n                        \"text\": \"Число самопроизвольных абортов (выкидышей) и абортов, произведенных по медицинским и социальным показаниям\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueInteger\": 0\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"11\",\r\n                        \"text\": \"Число прерываний беременности, включая число искусственных медицинских абортов и вакуум-аспираций\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueInteger\": 0\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"12\",\r\n                        \"text\": \"Число живых к настоящему моменту детей у матери\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueInteger\": 1\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"13\",\r\n                        \"text\": \"Дата окончания последней из беременностей, предшествовавших настоящей\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueDate\": \"2021-02-27\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"14\",\r\n                        \"text\": \"Данные об исходе последней беременности, предшествовавшей настоящей\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueCoding\": {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PregnancyOutcome\",\r\n                                    \"code\": \"02\",\r\n                                    \"display\": \"Роды мертвым плодом\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"linkId\": \"15\",\r\n                        \"text\": \"Масса тела ребёнка при рождении (в граммах)\",\r\n                        \"answer\": [\r\n                            {\r\n                                \"valueInteger\": 2100\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$validate",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$validate"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Подписание пакета",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "let responseJson = pm.response.json();\r",
                  "pm.environment.set(\"cmsValue\", responseJson.cms);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "const CryptoJS = require('crypto-js');\r",
                  "const data_raw1 = pm.environment.get('data_raw1');\r",
                  "const data_base64 = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(data_raw1));\r",
                  "pm.environment.set('data_base64', data_base64);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"data\": \"{{data_base64}}\",\r\n    \"isDetached\": \"false\"\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "http://localhost:8084/sign",
              "protocol": "http",
              "host": [
                "localhost"
              ],
              "port": "8084",
              "path": [
                "sign"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Импорт подписанного документа",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/cms",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "\"{{cmsValue}}\"",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинских данных",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия сведений окончательного врачебного свидетельства о смерти",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/Stillbirth&status=completed",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/Stillbirth"
                },
                {
                  "key": "status",
                  "value": "completed"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия специальных сведений о матери",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/QuestionnaireResponse?_profile=https://fhir.by/StructureDefinition/QRSpecialInformation&patient={{patientId}}",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "QuestionnaireResponse"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/QRSpecialInformation"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение сводной информации",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/QuestionnaireResponse?_profile=https://fhir.by/StructureDefinition/QRSpecialInformation&patient={{patientId}}",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "QuestionnaireResponse"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/QRSpecialInformation"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                }
              ]
            }
          },
          "response": []
        }
      ]
    }
  ],
  "auth": {
    "type": "oauth2",
    "oauth2": [
      {
        "key": "client_authentication",
        "value": "body",
        "type": "string"
      },
      {
        "key": "scope",
        "value": "profile email acr realm roles term_client_credentials-dedicated",
        "type": "string"
      },
      {
        "key": "clientId",
        "value": "iehr.swagger.client",
        "type": "string"
      },
      {
        "key": "accessTokenUrl",
        "value": "https://staging.cisz.by/auth/api/realms/iehr/token",
        "type": "string"
      },
      {
        "key": "authUrl",
        "value": "https://staging.cisz.by/auth/api/realms/iehr/auth",
        "type": "string"
      },
      {
        "key": "redirect_uri",
        "value": "https://oauth.pstmn.io/v1/callback",
        "type": "string"
      },
      {
        "key": "grant_type",
        "value": "authorization_code_with_pkce",
        "type": "string"
      },
      {
        "key": "addTokenTo",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          "const schema = pm.collectionVariables.get('Schema')\r",
          "const host = pm.collectionVariables.get('Proxy-host');\r",
          "\r",
          "pm.sendRequest(`${schema}://${host}/fhir/metadata`, function (err, res) {\r",
          "    if (!err) {\r",
          "        var jsonData = res.json();\r",
          "        var activeImplementationGuide = jsonData.implementationGuide.filter(x => x.includes('Deprecated'));\r",
          "        \r",
          "        // Extracting the version from the active guide URL\r",
          "        if (activeImplementationGuide.length > 0) {\r",
          "            var versionMatch = activeImplementationGuide[0].match(/\\/(\\d+\\.\\d+\\.\\d+)\\?/);\r",
          "            console.log(versionMatch[1]);s\r",
          "            if (versionMatch) {\r",
          "                pm.request.headers.add({key: 'X-Fhir-By-Version', value: versionMatch[2]});\r",
          "            }\r",
          "        }\r",
          "    }\r",
          "});\r",
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "cms",
      "value": "MIIuRAYJKoZIhvcNAQcCoIIuNTCCLjECAQExDzANBgkqcAACACJlH1EFADCCJgMGCSqGSIb3DQEHAaCCJfQEgiXweyJyZXNvdXJjZVR5cGUiOiJCdW5kbGUiLCJpZCI6IjE4MjgwZTA2LTFkYjktNDRkYi05YzdiLTM2OTkzMmEwODJiYiIsIm1ldGEiOnsibGFzdFVwZGF0ZWQiOiIyMDI0LTAyLTAxVDEwOjMwOjAwWiIsInByb2ZpbGUiOlsiaHR0cHM6Ly9maGlyLmJ5L0Fic3RyYWN0QXJlYS9TdHJ1Y3R1cmVEZWZpbml0aW9uL0J1bmRsZS9CdW5kbGVURCJdfSwiaWRlbnRpZmllciI6eyJzeXN0ZW0iOiJodHRwczovL21pbnpkcmF2Lmdvdi5ieSIsInZhbHVlIjoiMDEtMTkzNjA1NzI5LTIwMjUwMDAwMDAwMDAyMjEtMDEifSwidHlwZSI6ImRvY3VtZW50IiwidGltZXN0YW1wIjoiMjAyNS0wNC0xN1QxMDozMDowMFoiLCJlbnRyeSI6W3siZnVsbFVybCI6IkNvbXBvc2l0aW9uL2YxNzc5Mzc2LTNhNTAtNDkxNy04YjcwLWYyNWE3YjhjNGM4YyIsInJlc291cmNlIjp7InJlc291cmNlVHlwZSI6IkNvbXBvc2l0aW9uIiwiaWQiOiJmMTc3OTM3Ni0zYTUwLTQ5MTctOGI3MC1mMjVhN2I4YzRjOGMiLCJtZXRhIjp7InByb2ZpbGUiOlsiaHR0cHM6Ly9maGlyLmJ5L1N0cnVjdHVyZURlZmluaXRpb24vRG9jdW1lbnRURCJdfSwic3RhdHVzIjoiZmluYWwiLCJ0eXBlIjp7ImNvZGluZyI6W3sic3lzdGVtIjoiaHR0cHM6Ly9maGlyLmJ5L1ZhbHVlU2V0L0RpZ2l0YWxEb2N1bWVudEtpbmQiLCJjb2RlIjoiMDEiLCJkaXNwbGF5Ijoi0K3Qu9C10LrRgtGA0L7QvdC90YvQuSDQu9C40YHRgiDQvdC10YLRgNGD0LTQvtGB0L/QvtGB0L7QsdC90L7RgdGC0LgifV19LCJzdWJqZWN0IjpbeyJyZWZlcmVuY2UiOiJQYXRpZW50L3BhLWYxYjUxOGE2LThlNGYtMTFmMC05OTlmLWMzZjNhNDNhYTE4MiIsImRpc3BsYXkiOiLQldCy0LTQvtC60LjQvNC+0LLQsCDQm9GO0LTQvNC40LvQsCDQmNCy0LDQvdC+0LLQvdCwIn1dLCJkYXRlIjoiMjAyNC0wMi0wMVQxMDozMDowMFoiLCJhdXRob3IiOlt7InJlZmVyZW5jZSI6IlByYWN0aXRpb25lci9hYTFlNjQ4Ny1hNGRkLTExZjAtYjYzOC1jNGU3MWJkNTFjZTIiLCJkaXNwbGF5Ijoi0KTQuNC70LDRgtC+0LIg0JjQs9C+0YDRjCDQn9C10YLRgNC+0LLQuNGHIn1dLCJ0aXRsZSI6ItCh0YLRgNGD0LrRgtGD0YDQsCDQrdCb0J0iLCJjdXN0b2RpYW4iOnsicmVmZXJlbmNlIjoiT3JnYW5pemF0aW9uLzE0NzM2NTE4LWNjMzQtNGUyZS04ZDYwLTIwNDk1NTU4OTU3NyIsImRpc3BsYXkiOiLQo9GH0YDQtdC20LTQtdC90LjQtSDQt9C00YDQsNCy0L7QvtGF0YDQsNC90LXQvdC40Y8gJzEt0Y8g0YbQtdC90YLRgNCw0LvRjNC90LDRjyDRgNCw0LnQvtC90L3QsNGPINC60LvQuNC90LjRh9C10YHQutCw0Y8g0L/QvtC70LjQutC70LjQvdC40LrQsCDQptC10L3RgtGA0LDQu9GM0L3QvtCz0L4g0YDQsNC50L7QvdCwINCzLtCc0LjQvdGB0LrQsCcifSwiZXZlbnQiOlt7ImRldGFpbCI6W3sicmVmZXJlbmNlIjp7InJlZmVyZW5jZSI6IkVwaXNvZGVPZkNhcmUvdGQtNTRhMTE0MTctYTM3Yy0xMWYwLWFhYzktN2Q5NTQ5MzcxZmZjIn19XX0seyJkZXRhaWwiOlt7InJlZmVyZW5jZSI6eyJyZWZlcmVuY2UiOiJUYXNrL2Y1NzM1OTU4LWRhYzUtNGM1YS05ZTI3LWQ2M2Y1ZGE2YTM5OCJ9fV19LHsiZGV0YWlsIjpbeyJyZWZlcmVuY2UiOnsicmVmZXJlbmNlIjoiUHJvdmVuYW5jZS9kZWY4ZGVjMS1jODVkLTRkYmEtYTkwNC05NjA0MmJjYTE5OGYifX1dfV19fSx7ImZ1bGxVcmwiOiJQYXRpZW50L3BjLThlZWRlZTk5LTE5MDktNGQxNy05M2JmLWI4ZmZiMGM1ZTU4MCIsInJlc291cmNlIjp7InJlc291cmNlVHlwZSI6IlBhdGllbnQiLCJpZCI6InBjLThlZWRlZTk5LTE5MDktNGQxNy05M2JmLWI4ZmZiMGM1ZTU4MCIsIm1ldGEiOnsibGFzdFVwZGF0ZWQiOiIyMDI1LTA3LTIzVDE2OjAwOjAwWiIsInByb2ZpbGUiOlsiaHR0cHM6Ly9maGlyLmJ5L1N0cnVjdHVyZURlZmluaXRpb24vUGF0aWVudEVEIl19LCJleHRlbnNpb24iOlt7InVybCI6Imh0dHBzOi8vZmhpci5ieS9TdHJ1Y3R1cmVEZWZpbml0aW9uL0RvY3VtZW50S2luZCIsInZhbHVlQ29kZWFibGVDb25jZXB0Ijp7ImNvZGluZyI6W3sic3lzdGVtIjoiaHR0cHM6Ly9maGlyLmJ5L1ZhbHVlU2V0L0RpZ2l0YWxEb2N1bWVudEtpbmQiLCJjb2RlIjoiMDEifV19fV0sImlkZW50aWZpZXIiOlt7InR5cGUiOnsiY29kaW5nIjpbeyJzeXN0ZW0iOiJodHRwczovL2ZoaXIuYnkvVmFsdWVTZXQvUGVyc29uYWxEb2N1bWVudFR5cGUiLCJjb2RlIjoiSVBBIn1dfSwidmFsdWUiOiI3MTUwODkyQTAwMVBCOSJ9XSwiYWN0aXZlIjp0cnVlLCJuYW1lIjpbeyJmYW1pbHkiOiLQldCy0LTQvtC60LjQvNC+0LLQsCIsImdpdmVuIjpbItCb0Y7QtNC80LjQu9CwIiwi0JjQstCw0L3QvtCy0L3QsCJdfV0sImJpcnRoRGF0ZSI6IjE5ODgtMDQtMjEiLCJsaW5rIjpbeyJvdGhlciI6eyJyZWZlcmVuY2UiOiJQYXRpZW50L3BhLWYxYjUxOGE2LThlNGYtMTFmMC05OTlmLWMzZjNhNDNhYTE4MiJ9LCJ0eXBlIjoicmVmZXIifV19fSx7ImZ1bGxVcmwiOiJFcGlzb2RlT2ZDYXJlL3RkLTU1N2Q3MTkwLWE4MjgtMTFmMC04ZmRhLWU3YmE1NmQwZjlkZCIsInJlc291cmNlIjp7InJlc291cmNlVHlwZSI6IkVwaXNvZGVPZkNhcmUiLCJpZCI6InRkLTU1N2Q3MTkwLWE4MjgtMTFmMC04ZmRhLWU3YmE1NmQwZjlkZCIsIm1ldGEiOnsicHJvZmlsZSI6WyJodHRwczovL2ZoaXIuYnkvU3RydWN0dXJlRGVmaW5pdGlvbi9FcGlzb2RlT2ZUZW1wb3JhcnlEaXNhYmlsaXR5U3VtIl19LCJleHRlbnNpb24iOlt7ImV4dGVuc2lvbiI6W3sidXJsIjoiaHR0cHM6Ly9maGlyLmJ5L1N0cnVjdHVyZURlZmluaXRpb24vUHJhY3RpdGlvbmVyUm9sZVJlZmVyZW5jZSIsInZhbHVlUmVmZXJlbmNlIjp7InJlZmVyZW5jZSI6IlByYWN0aXRpb25lclJvbGUvYWE3NWJkZGMtYTRkZC0xMWYwLWI2MzgtYzRlNzFiZDUxY2UyIiwiZGlzcGxheSI6ItCm0LDRgNC10L3QutC+INCh0LXRgNCz0LXQuSDQktC70LDQtNC40LzQuNGA0L7QstC40YcuINCS0YDQsNGHLdCw0LvQu9C10YDQs9C+0LvQvtCzLdC40LzQvNGD0L3QvtC70L7QsyJ9fSx7InVybCI6Imh0dHBzOi8vZmhpci5ieS9TdHJ1Y3R1cmVEZWZpbml0aW9uL09yZ2FuaXphdGlvblJlZmVyZW5jZSIsInZhbHVlUmVmZXJlbmNlIjp7InJlZmVyZW5jZSI6Ik9yZ2FuaXphdGlvbi8xNDczNjUxOC1jYzM0LTRlMmUtOGQ2MC0yMDQ5NTU1ODk1NzciLCJkaXNwbGF5Ijoi0J7RgtC60YDRi9GC0L7QtSDQsNC60YbQuNC+0L3QtdGA0L3QvtC1INC+0LHRidC10YHRgtCy0L4gXCLQkNCz0LXQvdGC0YHRgtCy0L4g0YHQtdGA0LLQuNGB0LjQt9Cw0YbQuNC4INC4INGA0LXQuNC90LbQuNC90LjRgNC40L3Qs9CwXCIifX0seyJ1cmwiOiJodHRwczovL2ZoaXIuYnkvU3RydWN0dXJlRGVmaW5pdGlvbi9UZW1wb3JhcnlEaXNhYmlsaXR5UmVnaW1lIiwidmFsdWVDb2RlYWJsZUNvbmNlcHQiOnsiY29kaW5nIjpbeyJzeXN0ZW0iOiJodHRwczovL2ZoaXIuYnkvVmFsdWVTZXQvVGVtcG9yYXJ5RGlzYWJpbGl0eVJlZ2ltZSIsInZlcnNpb24iOiIxIiwiY29kZSI6IjEiLCJkaXNwbGF5Ijoi0LDQvNCx0YPQu9Cw0YLQvtGA0L3Ri9C5In1dfX0seyJ1cmwiOiJodHRwczovL2ZoaXIuYnkvU3RydWN0dXJlRGVmaW5pdGlvbi9UZW1wb3JhcnlEaXNhYmlsaXR5UGVyaW9kUGFpZCIsInZhbHVlQ29kZWFibGVDb25jZXB0Ijp7ImNvZGluZyI6W3sic3lzdGVtIjoiaHR0cHM6Ly9maGlyLmJ5L1ZhbHVlU2V0L1RlbXBvcmFyeURpc2FiaWxpdHlQZXJpb2RQYWlkQ29kZSIsInZlcnNpb24iOiIxLjIiLCJjb2RlIjoiMSIsImRpc3BsYXkiOiLQvtC/0LvQsNGH0LjQstCw0LXQvNGL0Lkg0L/QtdGA0LjQvtC0In1dfX0seyJ1cmwiOiJodHRwczovL2ZoaXIuYnkvU3RydWN0dXJlRGVmaW5pdGlvbi9UZW1wb3JhcnlEaXNhYmlsaXR5S2luZERpc2FiaWxpdHkiLCJ2YWx1ZUNvZGVhYmxlQ29uY2VwdCI6eyJjb2RpbmciOlt7InN5c3RlbSI6Imh0dHBzOi8vZmhpci5ieS9WYWx1ZVNldC9UZW1wb3JhcnlEaXNhYmlsaXR5S2luZERpc2FiaWxpdHkiLCJ2ZXJzaW9uIjoiMS4xOCIsImNvZGUiOiIwOSIsImRpc3BsYXkiOiLQsiDRgdCy0Y/Qt9C4INGBINCx0LXRgNC10LzQtdC90L3QvtGB0YLRjNGOINC4INGA0L7QtNCw0LzQuCwg0LIg0YLQvtC8INGH0LjRgdC70LUg0L3QsNGB0YLRg9C/0LjQstGI0LjQvNC4INC00L4gMzAg0L3QtdC00LXQu9GMINCx0LXRgNC10LzQtdC90L3QvtGB0YLQuCAoMjcg0L3QtdC00LXQu9GMINCx0LXRgNC10LzQtdC90L3QvtGB0YLQuCAtINGDINC20LXQvdGJ0LjQvSwg0L/QvtGB0YLQvtGP0L3QvdC+ICjQv9GA0LXQuNC80YPRidC10YHRgtCy0LXQvdC90L4pINC/0YDQvtC20LjQstCw0Y7RidC40YUg0LggKNC40LvQuCkg0YDQsNCx0L7RgtCw0Y7RidC40YUsINC/0YDQvtGF0L7QtNGP0YnQuNGFINGB0LvRg9C20LHRgywg0L7QsdGD0YfQsNGO0YnQuNGF0YHRjyDQvdCwINGC0LXRgNGA0LjRgtC+0YDQuNC4INGA0LDQtNC40L7QsNC60YLQuNCy0L3QvtCz0L4g0LfQsNCz0YDRj9C30L3QtdC90LjRjyksINC+0YHQu9C+0LbQvdC10L3QuNGP0LzQuCDQsdC10YDQtdC80LXQvdC90L7RgdGC0LgsINGA0L7QtNC+0LIg0LggKNC40LvQuCkg0L/QvtGB0LvQtdGA0L7QtNC+0LLQvtCz0L4g0L/QtdGA0LjQvtC00LAsINCwINGC0LDQutC20LUg0YPRgdGL0L3QvtCy0LvQtdC90LjQtdC8ICjRg9C00L7Rh9C10YDQtdC90LjQtdC8KSwg0YPRgdGC0LDQvdC+0LLQu9C10L3QuNC10Lwg0L7Qv9C10LrQuCDQvdCw0LQg0YDQtdCx0LXQvdC60L7QvCDQsiDQstC+0LfRgNCw0YHRgtC1INC00L4gMyDQvNC10YHRj9GG0LXQsiAo0LHQtdGA0LXQvNC10L3QvdC+0YHRgtGMINC4INGA0L7QtNGLKSJ9XX19LHsidXJsIjoiaHR0cHM6Ly9maGlyLmJ5L1N0cnVjdHVyZURlZmluaXRpb24vUHJhY3RpdGlvbmVyUm9sZVJlZmVyZW5jZSIsInZhbHVlUmVmZXJlbmNlIjp7InJlZmVyZW5jZSI6IlByYWN0aXRpb25lclJvbGUvZGRkNWRmNjctYTRlNS0xMWYwLWI2MzgtYzRlNzFiZDUxY2UyIiwiZGlzcGxheSI6ItCh0LLQuNGA0LjQtNC+0LLQuNGHINCS0LjQutGC0L7RgNC40Y8g0JPQtdC90L3QsNC00YzQtdCy0L3QsC4g0JLRgNCw0Ycg0LDQstC40LDRhtC40L7QvdC90YvQuSJ9fSx7InVybCI6Imh0dHBzOi8vZmhpci5ieS9TdHJ1Y3R1cmVEZWZpbml0aW9uL1RlbXBvcmFyeURpc2FiaWxpdHlFbmNvdW50ZXJQZXJpb2QiLCJ2YWx1ZVBlcmlvZCI6eyJzdGFydCI6IjIwMjYtMDItMDEiLCJlbmQiOiIyMDI2LTAyLTE0In19XSwidXJsIjoiaHR0cHM6Ly9maGlyLmJ5L1N0cnVjdHVyZURlZmluaXRpb24vUmVsZWFzZVBlcmlvZCJ9LHsidXJsIjoiaHR0cHM6Ly9maGlyLmJ5L1N0cnVjdHVyZURlZmluaXRpb24vVERDYXNlQ2xvc2luZyIsInZhbHVlQ29kZWFibGVDb25jZXB0Ijp7ImNvZGluZyI6W3sic3lzdGVtIjoiaHR0cHM6Ly9maGlyLmJ5L1ZhbHVlU2V0L1REQ2FzZUNsb3NpbmciLCJ2ZXJzaW9uIjoiMS4xNSIsImNvZGUiOiIxIiwiZGlzcGxheSI6ItCf0LDRhtC40LXQvdGCINC/0YDQuNC30L3QsNC9INGC0YDRg9C00L7RgdC/0L7RgdC+0LHQvdGL0LwsINC40LvQuCDQt9Cw0LrRgNGL0LLQsNC10YLRgdGPINCb0J0g0LIg0YHQstGP0LfQuCDRgSDRg9GF0L7QtNC+0Lwg0LfQsCDQsdC+0LvRjNC90YvQvCDRh9C70LXQvdC+0Lwg0YHQtdC80YzQuCJ9XX19LHsiZXh0ZW5zaW9uIjpbeyJ1cmwiOiJodHRwczovL2ZoaXIuYnkvU3RydWN0dXJlRGVmaW5pdGlvbi9EYXRlRmxhZ1JlYXNvbiIsInZhbHVlRGF0ZSI6IjIwMjUtMTAtMTAifSx7InVybCI6Imh0dHBzOi8vZmhpci5ieS9TdHJ1Y3R1cmVEZWZpbml0aW9uL1NwZWNpYWxNYXJrQ29kZSIsInZhbHVlQ29kZWFibGVDb25jZXB0Ijp7ImV4dGVuc2lvbiI6W3sidXJsIjoiaHR0cHM6Ly9maGlyLmJ5L1N0cnVjdHVyZURlZmluaXRpb24vU3BlY2lhbE1hcmtQcmFjdGl0aW9uZXJSb2xlIiwidmFsdWVSZWZlcmVuY2UiOnsicmVmZXJlbmNlIjoiUHJhY3RpdGlvbmVyUm9sZS9hYTc1YmRkYy1hNGRkLTExZjAtYjYzOC1jNGU3MWJkNTFjZTIiLCJkaXNwbGF5Ijoi0KbQsNGA0LXQvdC60L4g0KHQtdGA0LPQtdC5INCS0LvQsNC00LjQvNC40YDQvtCy0LjRhy4g0JLRgNCw0Yct0LDQu9C70LXRgNCz0L7Qu9C+0LMt0LjQvNC80YPQvdC+0LvQvtCzIn19LHsidXJsIjoiaHR0cHM6Ly9maGlyLmJ5L1N0cnVjdHVyZURlZmluaXRpb24vU3BlY2lhbE1hcmtEYXRlIiwidmFsdWVEYXRlIjoiMjAyNS0xMC0xMCJ9XSwiY29kaW5nIjpbeyJzeXN0ZW0iOiJodHRwczovL2ZoaXIuYnkvVmFsdWVTZXQvRmxhZ1NwZWNpYWxNYXJrcyIsInZlcnNpb24iOiIxLjExMyIsImNvZGUiOiJjb21wbGljYXRlZC1sYWJvciIsImRpc3BsYXkiOiLQvtGB0LvQvtC20L3QtdC90L3Ri9C1INGA0L7QtNGLLCDQtNCw0YLQsCJ9XX19LHsidXJsIjoiaHR0cHM6Ly9maGlyLmJ5L1N0cnVjdHVyZURlZmluaXRpb24vU3BlY2lhbE1hcmtQcmFjdGl0aW9uZXJSb2xlIiwidmFsdWVSZWZlcmVuY2UiOnsicmVmZXJlbmNlIjoiUHJhY3RpdGlvbmVyUm9sZS9hYTc1YmRkYy1hNGRkLTExZjAtYjYzOC1jNGU3MWJkNTFjZTIiLCJkaXNwbGF5Ijoi0KbQsNGA0LXQvdC60L4g0KHQtdGA0LPQtdC5INCS0LvQsNC00LjQvNC40YDQvtCy0LjRhy4g0JLRgNCw0Yct0LDQu9C70LXRgNCz0L7Qu9C+0LMt0LjQvNC80YPQvdC+0LvQvtCzIn19XSwidXJsIjoiaHR0cHM6Ly9maGlyLmJ5L1N0cnVjdHVyZURlZmluaXRpb24vU3BlY2lhbE1hcmsifV0sImlkZW50aWZpZXIiOlt7InVzZSI6InVzdWFsIiwidmFsdWUiOiIyMDI1MDAwMDAwMDAwMjIxIn1dLCJzdGF0dXMiOiJmaW5pc2hlZCIsInBhdGllbnQiOnsicmVmZXJlbmNlIjoiUGF0aWVudC9wYS1mMWI1MThhNi04ZTRmLTExZjAtOTk5Zi1jM2YzYTQzYWExODIiLCJkaXNwbGF5Ijoi0JvRjtC00LzQuNC70LAg0JjQstCw0L3QvtCy0L3QsCJ9LCJwZXJpb2QiOnsic3RhcnQiOiIyMDI2LTAyLTAxIiwiZW5kIjoiMjAyNi0wMi0xNCJ9LCJjYXJlTWFuYWdlciI6eyJyZWZlcmVuY2UiOiJQcmFjdGl0aW9uZXJSb2xlL2FhNzViZGRjLWE0ZGQtMTFmMC1iNjM4LWM0ZTcxYmQ1MWNlMiIsImRpc3BsYXkiOiLQptCw0YDQtdC90LrQviDQodC10YDQs9C10Lkg0JLQu9Cw0LTQuNC80LjRgNC+0LLQuNGHLiDQktGA0LDRhy3QsNC70LvQtdGA0LPQvtC70L7Qsy3QuNC80LzRg9C90L7Qu9C+0LMifX19LHsiZnVsbFVybCI6IlRhc2svZjU3MzU5NTgtZGFjNS00YzVhLTllMjctZDYzZjVkYTZhMzk4IiwicmVzb3VyY2UiOnsicmVzb3VyY2VUeXBlIjoiVGFzayIsImlkIjoiZjU3MzU5NTgtZGFjNS00YzVhLTllMjctZDYzZjVkYTZhMzk4IiwibWV0YSI6eyJsYXN0VXBkYXRlZCI6IjIwMjQtMDQtMTZUMTA6MzA6MDBaIiwicHJvZmlsZSI6WyJodHRwczovL2ZoaXIuYnkvU3RydWN0dXJlRGVmaW5pdGlvbi9FcGlzb2RlVG9CZVBhaWQiXX0sImJhc2VkT24iOlt7InJlZmVyZW5jZSI6IkVwaXNvZGVPZkNhcmUvdGQtNTU3ZDcxOTAtYTgyOC0xMWYwLThmZGEtZTdiYTU2ZDBmOWRkIn1dLCJzdGF0dXMiOiJyZXF1ZXN0ZWQiLCJpbnRlbnQiOiJvcmRlciIsImZvciI6eyJyZWZlcmVuY2UiOiJQYXRpZW50L3BjLThlZWRlZTk5LTE5MDktNGQxNy05M2JmLWI4ZmZiMGM1ZTU4MCIsImRpc3BsYXkiOiLQldCy0LTQvtC60LjQvNC+0LLQsCDQm9GO0LTQvNC40LvQsCDQmNCy0LDQvdC+0LLQvdCwIn0sImV4ZWN1dGlvblBlcmlvZCI6eyJzdGFydCI6IjIwMjYtMDItMDEiLCJlbmQiOiIyMDI2LTAyLTE0In0sInJlcXVlc3RlciI6eyJyZWZlcmVuY2UiOiJPcmdhbml6YXRpb24vMTQ3MzY1MTgtY2MzNC00ZTJlLThkNjAtMjA0OTU1NTg5NTc3IiwiZGlzcGxheSI6ItCj0YfRgNC10LbQtNC10L3QuNC1INC30LTRgNCw0LLQvtC+0YXRgNCw0L3QtdC90LjRjyAnMS3RjyDRhtC10L3RgtGA0LDQu9GM0L3QsNGPINGA0LDQudC+0L3QvdCw0Y8g0LrQu9C40L3QuNGH0LXRgdC60LDRjyDQv9C+0LvQuNC60LvQuNC90LjQutCwINCm0LXQvdGC0YDQsNC70YzQvdC+0LPQviDRgNCw0LnQvtC90LAg0LMu0JzQuNC90YHQutCwJyJ9LCJvd25lciI6eyJyZWZlcmVuY2UiOiJQcmFjdGl0aW9uZXJSb2xlL2FhNzViZGRjLWE0ZGQtMTFmMC1iNjM4LWM0ZTcxYmQ1MWNlMiIsImRpc3BsYXkiOiLQktGA0LDRhy3RgdC/0LXRhtC40LDQu9C40YHRgiwg0KTQuNC70LDRgtC+0LIg0JjQs9C+0YDRjCDQn9C10YLRgNC+0LLQuNGHIn0sInBlcmZvcm1lciI6W3siYWN0b3IiOnsicmVmZXJlbmNlIjoiUGF0aWVudC9wYS1mMWI1MThhNi04ZTRmLTExZjAtOTk5Zi1jM2YzYTQzYWExODIiLCJkaXNwbGF5Ijoi0JXQstC00L7QutC40LzQvtCy0LAg0JvRjtC00LzQuNC70LAg0JjQstCw0L3QvtCy0L3QsCJ9fV19fSx7ImZ1bGxVcmwiOiJQcm92ZW5hbmNlL2RlZjhkZWMxLWM4NWQtNGRiYS1hOTA0LTk2MDQyYmNhMTk4ZiIsInJlc291cmNlIjp7InJlc291cmNlVHlwZSI6IlByb3ZlbmFuY2UiLCJpZCI6ImRlZjhkZWMxLWM4NWQtNGRiYS1hOTA0LTk2MDQyYmNhMTk4ZiIsIm1ldGEiOnsicHJvZmlsZSI6WyJodHRwczovL2ZoaXIuYnkvU3RydWN0dXJlRGVmaW5pdGlvbi9Qcm92ZW5hbmNlRG9jdW1lbnRJbmZvVEQiXX0sInRhcmdldCI6W3sicmVmZXJlbmNlIjoiUGF0aWVudC9wYS1mMWI1MThhNi04ZTRmLTExZjAtOTk5Zi1jM2YzYTQzYWExODIifV0sInJlY29yZGVkIjoiMjAyNS0wNC0xNlQxMDozMDowMFoiLCJhdXRob3JpemF0aW9uIjpbeyJyZWZlcmVuY2UiOnsicmVmZXJlbmNlIjoiVGFzay9mNTczNTk1OC1kYWM1LTRjNWEtOWUyNy1kNjNmNWRhNmEzOTgifX1dLCJwYXRpZW50Ijp7InJlZmVyZW5jZSI6IlBhdGllbnQvcGEtZjFiNTE4YTYtOGU0Zi0xMWYwLTk5OWYtYzNmM2E0M2FhMTgyIn0sImFnZW50IjpbeyJ0eXBlIjp7ImNvZGluZyI6W3sic3lzdGVtIjoiaHR0cHM6Ly9maGlyLmJ5L1ZhbHVlU2V0L0FnZW50VHlwZVByb3ZlbmFuY2UiLCJjb2RlIjoib3JnYW5pemF0aW9uIn1dfSwid2hvIjp7InJlZmVyZW5jZSI6Ik9yZ2FuaXphdGlvbi8xNDczNjUxOC1jYzM0LTRlMmUtOGQ2MC0yMDQ5NTU1ODk1NzciLCJkaXNwbGF5Ijoi0KPRh9GA0LXQttC00LXQvdC40LUg0LfQtNGA0LDQstC+0L7RhdGA0LDQvdC10L3QuNGPICcxLdGPINGG0LXQvdGC0YDQsNC70YzQvdCw0Y8g0YDQsNC50L7QvdC90LDRjyDQutC70LjQvdC40YfQtdGB0LrQsNGPINC/0L7Qu9C40LrQu9C40L3QuNC60LAg0KbQtdC90YLRgNCw0LvRjNC90L7Qs9C+INGA0LDQudC+0L3QsCDQsy7QnNC40L3RgdC60LAnIn19LHsidHlwZSI6eyJjb2RpbmciOlt7InN5c3RlbSI6Imh0dHBzOi8vZmhpci5ieS9WYWx1ZVNldC9BZ2VudFR5cGVQcm92ZW5hbmNlIiwiY29kZSI6InByYWN0aXRpb25lciJ9XX0sIndobyI6eyJyZWZlcmVuY2UiOiJQcmFjdGl0aW9uZXIvYWExZTY0ODctYTRkZC0xMWYwLWI2MzgtYzRlNzFiZDUxY2UyIiwiZGlzcGxheSI6ItCk0LjQu9Cw0YLQvtCyINCY0LPQvtGA0Ywg0J/QtdGC0YDQvtCy0LjRhyJ9fSx7InR5cGUiOnsiY29kaW5nIjpbeyJzeXN0ZW0iOiJodHRwczovL2ZoaXIuYnkvVmFsdWVTZXQvQWdlbnRUeXBlUHJvdmVuYW5jZSIsImNvZGUiOiJwcmFjdGl0aW9uZXJSb2xlIn1dfSwid2hvIjp7InJlZmVyZW5jZSI6IlByYWN0aXRpb25lclJvbGUvYWE3NWJkZGMtYTRkZC0xMWYwLWI2MzgtYzRlNzFiZDUxY2UyIiwiZGlzcGxheSI6ItCS0YDQsNGHLdGB0L/QtdGG0LjQsNC70LjRgdGCLCDQpNC40LvQsNGC0L7QsiDQmNCz0L7RgNGMINCf0LXRgtGA0L7QstC40YcifX1dfX1dfaCCBbIwggWuMIIFaKADAgECAgxA5m5Qzm4xBgAuG2MwDQYJKnAAAgAiZS0MBQAwggGDMYGbMIGYBgNVBAoMgZDQoNC10YHQv9GD0LHQu9C40LrQsNC90YHQutC+0LUg0YPQvdC40YLQsNGA0L3QvtC1INC/0YDQtdC00L/RgNC40Y/RgtC40LUgItCd0LDRhtC40L7QvdCw0LvRjNC90YvQuSDRhtC10L3RgtGAINGN0LvQtdC60YLRgNC+0L3QvdGL0YUg0YPRgdC70YPQsyIxXjBcBgNVBAMMVdCg0LXRgdC/0YPQsdC70LjQutCw0L3RgdC60LjQuSDRg9C00L7RgdGC0L7QstC10YDRj9GO0YnQuNC5INGG0LXQvdGC0YAg0JPQvtGB0KHQo9Ce0JoxCzAJBgNVBAYTAkJZMRcwFQYDVQQIDA7QnNC40L3RgdC60LDRjzEXMBUGA1UEBwwO0LMuINCc0LjQvdGB0LoxJTAjBgNVBAkMHNC/0YAt0YIg0JzQsNGI0LXRgNC+0LLQsCwgMjUxHTAbBgkqhkiG9w0BCQEWDnJjYUBwa2kuZ292LmJ5MB4XDTI1MTAwODA5MzYxN1oXDTI2MTAwNzIwNTk1OVowggHOMTYwNAYDVQQJDC3Rg9C7LtCa0LvQsNGA0Ysg0KbQtdGC0LrQuNC9LCDQtC4yNCwg0L7RhC43MDUxgYMwgYAGA1UEAwx50J7RgtC60YDRi9GC0L7QtSDQsNC60YbQuNC+0L3QtdGA0L3QvtC1INC+0LHRidC10YHRgtCy0L4gItCQ0LPQtdC90YLRgdGC0LLQviDRhtC40YTRgNC+0LLQvtC5INGC0YDQsNC90YHRhNC+0YDQvNCw0YbQuNC4IjEXMBUGA1UEBAwO0KbQsNGA0LXQvdC60L4xGjAYBgkqhkiG9w0BCQEWC3RzdkBhZ3NyLmJ5MQswCQYDVQQGEwJCWTGBgzCBgAYDVQQKDHnQntGC0LrRgNGL0YLQvtC1INCw0LrRhtC40L7QvdC10YDQvdC+0LUg0L7QsdGJ0LXRgdGC0LLQviAi0JDQs9C10L3RgtGB0YLQstC+INGG0LjRhNGA0L7QstC+0Lkg0YLRgNCw0L3RgdGE0L7RgNC80LDRhtC40LgiMS4wLAYDVQQpDCXQodC10YDQs9C10Lkg0JLQu9Cw0LTQuNC80LjRgNC+0LLQuNGHMRYwFAYDVQQHDA3Qsy7QnNC40L3RgdC6MF0wGAYKKnAAAgAiZS0CAQYKKnAAAgAiZS0DAQNBAJeYPU0tsVfgckq/jFwS8cU0XO9aTs5e7Q2i4K/lVVyQinXnCVnH3FAMKbRlX99xAJwqwi4jSFTh6/340zw0JfGjggFqMIIBZjAfBgNVHSMEGDAWgBSlVbJRYxDiU9/GKpdby5vmeHgt1TAJBgNVHRMEAjAAMAsGA1UdDwQEAwIDuDATBgNVHSUEDDAKBggrBgEFBQcDAjAdBgNVHQ4EFgQUkr68iqoQdZKqkg3iibXLCIMOh8MwMgYIKnABAgEBBQQEJjAkMCKADzIwMjUxMDA4MDkzNTE4WoEPMjA0MDEwMDgwOTM1MThaMCEGCSpwAQIBAQEBAgQUHhIAMQA5ADMANgAwADUANwAyADkwKwYJKnABAgEBAQEBBB4eHAAzADIANwAwADIAOAA3AEEAMAA2ADcAUABCADIwPQYJKnABAgEBAQIBBDAeLgAxAC4AMgAuADEAMQAyAC4AMQAuADIALgAxAC4AMQAuADEALgAyAC4AMQAuADQwNAYIKnABAgEBBQEEKB4mBBgEPQQ2BDUEPQQ1BEAALQQ/BEAEPgQzBEAEMAQ8BDwEOARBBEIwDQYJKnAAAgAiZS0MBQADMQAHmoH6NK3/B7/dqO6bKE0V2zpQy9POYQIcMdztmIQYGpFgtbAEIsy6la7VLxoIJl0xggJcMIICWAIBATCCAZUwggGDMYGbMIGYBgNVBAoMgZDQoNC10YHQv9GD0LHQu9C40LrQsNC90YHQutC+0LUg0YPQvdC40YLQsNGA0L3QvtC1INC/0YDQtdC00L/RgNC40Y/RgtC40LUgItCd0LDRhtC40L7QvdCw0LvRjNC90YvQuSDRhtC10L3RgtGAINGN0LvQtdC60YLRgNC+0L3QvdGL0YUg0YPRgdC70YPQsyIxXjBcBgNVBAMMVdCg0LXRgdC/0YPQsdC70LjQutCw0L3RgdC60LjQuSDRg9C00L7RgdGC0L7QstC10YDRj9GO0YnQuNC5INGG0LXQvdGC0YAg0JPQvtGB0KHQo9Ce0JoxCzAJBgNVBAYTAkJZMRcwFQYDVQQIDA7QnNC40L3RgdC60LDRjzEXMBUGA1UEBwwO0LMuINCc0LjQvdGB0LoxJTAjBgNVBAkMHNC/0YAt0YIg0JzQsNGI0LXRgNC+0LLQsCwgMjUxHTAbBgkqhkiG9w0BCQEWDnJjYUBwa2kuZ292LmJ5AgxA5m5Qzm4xBgAuG2MwDQYJKnAAAgAiZR9RBQCgaTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0yNTEwMTMxNDU3NDJaMC8GCSqGSIb3DQEJBDEiBCBD+++15duaAU3JNA1XvnMbDh/qnzyRckUpXe6N3zOVmjAOBgoqcAACACJlLQIBBQAEMJH5Yn1h+V+4GUFdQtscGUi3FuIEuyEppd/rBhqThzvNAZEaB4Roent1SFJp0WcT4Q=="
    },
    {
      "key": "report",
      "value": "\"<!DOCTYPE html>\\n<html lang=\\\"ru\\\">\\n  <head>\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.googleapis.com\\\">\\n    <link rel=\\\"preconnect\\\" href=\\\"https://fonts.gstatic.com\\\" crossorigin>\\n    <link href=\\\"https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap\\\" rel=\\\"stylesheet\\\">\\n    <meta charset=\\\"UTF-8\\\" />\\n    <title>Электронный листок нетрудоспособности</title>\\n     <style>\\n      body {\\n        font-family: \\\"Open Sans\\\", Arial, sans-serif;\\n        background-color: #fff;\\n        color: #18212F;\\n        margin: 0;\\n        padding: 0px;\\n\\tletter-spacing: -0.2px;\\n      }\\n\\n      .container {\\n        max-width: 1024px;\\n        margin: auto;\\n        border: 2px solid #005cb9;\\n        padding: 20px;\\n        box-sizing: border-box;\\n      }\\n\\n      h1 {\\n        text-align: center;\\n        color: #145EB0;\\n        font-size: 16pt;\\n        margin-bottom: 16px;\\n\\tmargin-top: 0px;\\n      }\\n\\n      .eln-header {\\n        display: flex;\\n        justify-content: space-between;\\n        align-items: center;\\n        font-weight: bold;\\n        margin-bottom: 16px;\\n      }\\n\\n      .eln-header .number {\\n        color: #F7776A;\\n      }\\n\\n      .eln-header .date {\\n        color: #18212F;\\n      }\\n\\n      .section {\\n        margin-bottom: 12px;\\n      }\\n\\n      .section-title {\\n        background-color: #145EB0;\\n        color: #fff;\\n        padding: 2px 10px;\\n        font-weight: bold;\\n        font-size: 8pt;\\n        width: fit-content;\\n      }\\n\\n      table {\\n        width: 100%;\\n        border-collapse: collapse;\\n        margin-top: 0px;\\n        table-layout: fixed;\\n      }\\n\\n      td,\\n      th {\\n        border: 1px solid rgba(20, 94, 176, 0.3); /* 30% непрозрачности */\\n        padding: 2px 10px;\\n        font-size: 10.5px;\\n        vertical-align: top;\\n      }\\n\\n      th {\\n        background-color: #F1F7FE;\\n        text-align: left;\\n      }\\n\\n      th.fixed-width {\\n        width: 220px;\\n        white-space: nowrap;\\n      }\\n\\n\\tspan{\\n\\tfont-size: 10.5px;\\n\\tfont-weight:600;\\n\\t}\\n\\n    </style>\\n  </head>\\n  <body>\\n    <div class=\\\"container\\\">\\n      <h1>ЭЛЕКТРОННЫЙ ЛИСТОК НЕТРУДОСПОБНОСТИ</h1>\\n\\n      <div class=\\\"eln-header\\\">\\n        <div class=\\\"number\\\">01-193605729-2025000000000221-01</div>\\n        <div class=\\\"date\\\">Дата выдачи: 2025.04.17</div>\\n      </div>\\n\\n      <div class=\\\"section\\\">\\n        <div class=\\\"section-title\\\">СВЕДЕНИЯ О ВРЕМЕННО НЕТРУДОСПОСОБНОМ</div>\\n        <table>\\n          <colgroup>\\n            <col style=\\\"width: 235px\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n          </colgroup>\\n          <tr>\\n            <th>ФИО</th>\\n            <td colspan=\\\"3\\\">Евдокимова, Людмила, Ивановна</td>\\n          </tr>\\n          <tr>\\n            <th>ИЛС</th>\\n            <td>7150892A001PB9</td>\\n            <th>Дата рождения</th>\\n            <td>1988.04.21</td>\\n          </tr>\\n        </table>\\n      </div>\\n\\n      <div class=\\\"section\\\">\\n        <div class=\\\"section-title\\\">ОРГАНИЗАЦИЯ ЗДРАВООХРАНЕНИЯ</div>\\n        <table>\\n          <colgroup>\\n            <col style=\\\"width: 235px\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n          </colgroup>\\n          <tr>\\n            <th>Наименование</th>\\n            <td colspan=\\\"3\\\">Учреждение здравоохранения '1-я центральная районная клиническая поликлиника Центрального района г.Минска'</td>\\n          </tr>\\n          <tr>\\n            <th>УНП</th>\\n            <td colspan=\\\"3\\\">193605729</td>\\n          </tr>\\n        </table>\\n      </div>\\n\\n      <div class=\\\"section\\\">\\n        <div class=\\\"section-title\\\">ОСНОВНАЯ ИНФОРМАЦИЯ</div>\\n        <table>\\n          <colgroup>\\n            <col style=\\\"width: 235px\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n          </colgroup>\\n          <tr>\\n            <th>Дата начала случая ВН</th>\\n            <td>2026.02.01</td>\\n            <th>Оплачиваемый период</th>\\n            <td>2026.02.01, 2026.02.14</td>\\n          </tr>\\n          <tr>\\n            <th>Заключение о трудоспособности</th>\\n            <td>1</td>\\n            <th>Приступить к работе (службе, учебе)</th>\\n            <td></td>\\n          </tr>\\n        </table>\\n      </div>\\n\\n      <div class=\\\"section\\\">\\n        <div class=\\\"section-title\\\">ПЕРИОДЫ ОСВОБОЖДЕНИЯ ОТ РАБОТЫ (СЛУЖБЫ, УЧЕБЫ)</div>\\n        <table>\\n          <colgroup>\\n            <col style=\\\"width: 235px\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n          </colgroup>\\n          <tr>\\n            <th>Период</th>\\n            <td>2026.02.01-2026.02.14</td>\\n            <th>Сведения об оплате</th>\\n            <td>1</td>\\n          </tr>\\n          <tr>\\n            <th>Вид ВН</th>\\n            <td>09</td>\\n            <th>Режим ВН</th>\\n            <td>1</td>\\n          </tr>\\n          <tr>\\n            <th>ФИО медицинского работника</th>\\n            <td colspan=\\\"3\\\">Царенко Сергей Владимирович. Врач-аллерголог-иммунолог</td>\\n          </tr>\\n          <tr>\\n            <th>Должность медицинского работника *</th>\\n            <td colspan=\\\"3\\\">Царенко Сергей Владимирович. Врач-аллерголог-иммунолог</td>\\n          </tr>\\n          <tr>\\n            <th>ФИО руководителя</th>\\n            <td colspan=\\\"3\\\">Свиридович Виктория Геннадьевна. Врач авиационный</td>\\n          </tr>\\n          <tr>\\n            <th>Должность руководителя *</th>\\n            <td colspan=\\\"3\\\">Свиридович Виктория Геннадьевна. Врач авиационный</td>\\n          </tr>\\n          <tr>\\n            <th>Организация здравоохранения</th>\\n            <td colspan=\\\"3\\\">Открытое акционерное общество \\\"Агентство сервисизации и реинжиниринга\\\"</td>\\n          </tr>\\n        </table>\\n      </div>\\n\\n      <div class=\\\"section\\\">\\n        <div class=\\\"section-title\\\">ВКК</div>\\n        <table>\\n          <colgroup>\\n            <col style=\\\"width: 235px\\\" />\\n            <col style=\\\"width: auto\\\" />\\n          </colgroup>\\n          <tr>\\n            <th>ФИО председателя</th>\\n            <td></td>\\n          </tr>\\n          <tr>\\n            <th>Дата</th>\\n            <td></td>\\n          </tr>\\n        </table>\\n      </div>\\n\\n      <div class=\\\"section\\\">\\n        <div class=\\\"section-title\\\">МРЭК</div>\\n        <table>\\n          <colgroup>\\n            <col style=\\\"width: 235px\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n          </colgroup>\\n          <tr>\\n            <th>ФИО председателя</th>\\n            <td colspan=\\\"3\\\"></td>\\n          </tr>\\n          <tr>\\n            <th>Дата начала МСЭ</th>\\n            <td></td>\\n            <th>Дата окончания МСЭ</th>\\n            <td></td>\\n          </tr>\\n          <tr>\\n            <th>Заключение МРЭК</th>\\n            <td colspan=\\\"3\\\"></td>\\n          </tr>         \\n        </table>\\n      </div>\\n\\n      <div class=\\\"section\\\">\\n        <div class=\\\"section-title\\\">ОСОБЫЕ ОТМЕТКИ</div>\\n        <table>\\n          <colgroup>\\n            <col style=\\\"width: 235px\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n          </colgroup>\\n          <tr>\\n            <th>Дата внесения</th>\\n            <td>2025.10.10</td>\\n            <th>Дата (период), к которой относится особая отметка</th>\\n            <td></td>\\n          </tr>\\n          <tr>\\n            <th>Особая отметка</th>\\n            <td colspan=\\\"3\\\">осложненные роды, дата</td>\\n          </tr>\\n          <tr>\\n            <th>Организация здравоохранения</th>\\n            <td colspan=\\\"3\\\"></td>\\n          </tr>\\n          <tr>\\n            <th>ФИО медицинского работника</th>\\n            <td colspan=\\\"3\\\">Царенко Сергей Владимирович. Врач-аллерголог-иммунолог</td>\\n          </tr>\\n          <tr>\\n            <th>Должность медицинского работника *</th>\\n            <td colspan=\\\"3\\\">Царенко Сергей Владимирович. Врач-аллерголог-иммунолог</td>\\n          </tr>\\n        </table>\\n      </div>\\n\\n      <div class=\\\"section\\\">\\n        <div class=\\\"section-title\\\">ЭЛН ПОДПИСАЛ</div>\\n        <table>\\n          <colgroup>\\n            <col style=\\\"width: 235px\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n            <col style=\\\"width: auto\\\" />\\n          </colgroup>\\n          <tr>\\n            <th>ФИО медицинского работника</th>\\n            <td colspan=\\\"3\\\">Филатов Игорь Петрович</td>\\n          </tr>\\n          <tr>\\n            <th>Должность медицинского работника *</th>\\n            <td colspan=\\\"3\\\">Филатов Игорь Петрович</td>\\n          </tr>\\n          <tr>\\n            <th>Идентификатор открытого ключа</th>\\n            <td colspan=\\\"3\\\">Нужно выдрать из CMS и добавить в liquid model</td>\\n          </tr>\\n        </table>\\n      </div>\\n\\n      <span style=\\\"font-size:7pt\\\">* Согласно Общегосударственному классификатору Республики Беларусь ОКРБ 014-2017 \\\"Занятия\\\".</span>\\n      <br>\\n      <span style=\\\"font-size:7pt\\\">Это форма внешнего представления электронного листка нетрудоспособности по беременности и родам, подписанного электронной цифровой подписью.</span>\\n      <br>\\n      <span style=\\\"font-size:7pt\\\">Источник сведений - централизованная информационная система здравоохранения.</span>\\n    </div>\\n  \\r\\n<!-- Visual Studio Browser Link -->\\r\\n<script type=\\\"text/javascript\\\" src=\\\"/_vs/browserLink\\\" async=\\\"async\\\" id=\\\"__browserLink_initializationData\\\" data-requestId=\\\"52468032028b478e956d905123bd229a\\\" data-requestMappingFromServer=\\\"false\\\" data-connectUrl=\\\"http://localhost:62987/0260208de9d2451b8006b0ddb26c3d30/browserLink\\\"></script>\\r\\n<!-- End Browser Link -->\\r\\n<script src=\\\"/_framework/aspnetcore-browser-refresh.js\\\"></script></body>\\n</html>\",\n\t\t\"test\": true\n\t},\n\t\"BundleId\": \"0d7c8a95-a845-11f0-98f8-279a2fb3bcfe\",\n\t\"Message\": \"Status Code: 507. Error message: ORA-06550: line 1, column 16:\\nPLS-00302: component 'SEND_DOC' must be declared\\nORA-06550: line 1, column 7:\\nPL/SQL: Statement ignored\\n\""
    },
    {
      "key": "pregnancyPatientId",
      "value": "pa-f1b518a6-8e4f-11f0-999f-c3f3a43aa182"
    },
    {
      "key": "pregnancyTempDis",
      "value": "td-dbacfd78-aa84-11f0-a672-29bb57731f05"
    },
    {
      "key": "pregnancyTempDisProlong",
      "value": "td-ee99614e-a900-11f0-8cc9-ab7e9bf2059f"
    },
    {
      "key": "pregnancyProvenance",
      "value": "td-d77ed292-aa84-11f0-8401-3010318bf8f8"
    },
    {
      "key": "compressedBundle",
      "value": "{\"resourceType\":\"Bundle\",\"id\":\"1ea441c1-d585-4c3e-8967-12d8438c36cf\",\"meta\":{\"lastUpdated\":\"2024-02-01T10:30:00Z\",\"profile\":[\"https://fhir.by/AbstractArea/StructureDefinition/Bundle/BundleTD\"]},\"identifier\":{\"system\":\"https://minzdrav.gov.by\",\"value\":\"01-193605729-2025000000000223-01\"},\"type\":\"document\",\"timestamp\":\"2025-04-17T10:30:00Z\",\"entry\":[{\"fullUrl\":\"Composition/f1779376-3a50-4917-8b70-f25a7b8c4c8c\",\"resource\":{\"resourceType\":\"Composition\",\"id\":\"f1779376-3a50-4917-8b70-f25a7b8c4c8c\",\"meta\":{\"profile\":[\"https://fhir.by/StructureDefinition/DocumentTD\"]},\"status\":\"final\",\"type\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/DigitalDocumentKind\",\"code\":\"01\",\"display\":\"Электронный лист нетрудоспособности\"}]},\"subject\":[{\"reference\":\"Patient/pa-f1b518a6-8e4f-11f0-999f-c3f3a43aa182\",\"display\":\"Евдокимова Людмила Ивановна\"}],\"date\":\"2024-02-01T10:30:00Z\",\"author\":[{\"reference\":\"Practitioner/aa1e6487-a4dd-11f0-b638-c4e71bd51ce2\",\"display\":\"Филатов Игорь Петрович\"}],\"title\":\"Структура ЭЛН\",\"custodian\":{\"reference\":\"Organization/14736518-cc34-4e2e-8d60-204955589577\",\"display\":\"Учреждение здравоохранения '1-я центральная районная клиническая поликлиника Центрального района г.Минска'\"},\"event\":[{\"detail\":[{\"reference\":{\"reference\":\"EpisodeOfCare/td-2adc6d03-aa85-11f0-a672-29bb57731f05\"}}]},{\"detail\":[{\"reference\":{\"reference\":\"Task/f5735958-dac5-4c5a-9e27-d63f5da6a398\"}}]},{\"detail\":[{\"reference\":{\"reference\":\"Provenance/def8dec1-c85d-4dba-a904-96042bca198f\"}}]}]}},{\"fullUrl\":\"Patient/pc-8eedee99-1909-4d17-93bf-b8ffb0c5e580\",\"resource\":{\"resourceType\":\"Patient\",\"id\":\"pc-8eedee99-1909-4d17-93bf-b8ffb0c5e580\",\"meta\":{\"lastUpdated\":\"2025-07-23T16:00:00Z\",\"profile\":[\"https://fhir.by/StructureDefinition/PatientED\"]},\"extension\":[{\"url\":\"https://fhir.by/StructureDefinition/DocumentKind\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/DigitalDocumentKind\",\"code\":\"01\"}]}}],\"identifier\":[{\"type\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/PersonalDocumentType\",\"code\":\"IPA\"}]},\"value\":\"7150892A001PB9\"}],\"active\":true,\"name\":[{\"family\":\"Евдокимова\",\"given\":[\"Людмила\",\"Ивановна\"]}],\"birthDate\":\"1988-04-21\",\"link\":[{\"other\":{\"reference\":\"Patient/pa-f1b518a6-8e4f-11f0-999f-c3f3a43aa182\"},\"type\":\"refer\"}]}},{\"fullUrl\":\"EpisodeOfCare/td-2adc6d03-aa85-11f0-a672-29bb57731f05\",\"resource\":{\"resourceType\":\"EpisodeOfCare\",\"id\":\"td-2adc6d03-aa85-11f0-a672-29bb57731f05\",\"meta\":{\"profile\":[\"https://fhir.by/StructureDefinition/EpisodeOfTemporaryDisabilitySum\"]},\"extension\":[{\"extension\":[{\"url\":\"https://fhir.by/StructureDefinition/PractitionerRoleReference\",\"valueReference\":{\"reference\":\"PractitionerRole/aa75bddc-a4dd-11f0-b638-c4e71bd51ce2\",\"display\":\"Царенко Сергей Владимирович. Врач-аллерголог-иммунолог\"}},{\"url\":\"https://fhir.by/StructureDefinition/OrganizationReference\",\"valueReference\":{\"reference\":\"Organization/14736518-cc34-4e2e-8d60-204955589577\",\"display\":\"Открытое акционерное общество \\\"Агентство сервисизации и реинжиниринга\\\"\"}},{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDisabilityRegime\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TemporaryDisabilityRegime\",\"version\":\"1\",\"code\":\"1\",\"display\":\"амбулаторный\"}]}},{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDisabilityPeriodPaid\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TemporaryDisabilityPeriodPaidCode\",\"version\":\"1.2\",\"code\":\"1\",\"display\":\"оплачиваемый период\"}]}},{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDisabilityKindDisability\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TemporaryDisabilityKindDisability\",\"version\":\"1.18\",\"code\":\"09\",\"display\":\"в связи с беременностью и родами, в том числе наступившими до 30 недель беременности (27 недель беременности - у женщин, постоянно (преимущественно) проживающих и (или) работающих, проходящих службу, обучающихся на территории радиоактивного загрязнения), осложнениями беременности, родов и (или) послеродового периода, а также усыновлением (удочерением), установлением опеки над ребенком в возрасте до 3 месяцев (беременность и роды)\"}]}},{\"url\":\"https://fhir.by/StructureDefinition/PractitionerRoleReference\",\"valueReference\":{\"reference\":\"PractitionerRole/ddd5df67-a4e5-11f0-b638-c4e71bd51ce2\",\"display\":\"Свиридович Виктория Геннадьевна. Врач авиационный\"}},{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDisabilityEncounterPeriod\",\"valuePeriod\":{\"start\":\"2025-08-01\",\"end\":\"2025-11-05\"}}],\"url\":\"https://fhir.by/StructureDefinition/ReleasePeriod\"},{\"url\":\"https://fhir.by/StructureDefinition/TDCaseClosing\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TDCaseClosing\",\"version\":\"1.15\",\"code\":\"1\",\"display\":\"Пациент признан трудоспособным, или закрывается ЛН в связи с уходом за больным членом семьи\"}]}}],\"identifier\":[{\"use\":\"usual\",\"value\":\"2025000000000223\"}],\"status\":\"finished\",\"patient\":{\"reference\":\"Patient/pa-f1b518a6-8e4f-11f0-999f-c3f3a43aa182\",\"display\":\"Людмила Ивановна\"},\"period\":{\"start\":\"2025-08-01\",\"end\":\"2025-11-05\"},\"careManager\":{\"reference\":\"PractitionerRole/aa75bddc-a4dd-11f0-b638-c4e71bd51ce2\",\"display\":\"Царенко Сергей Владимирович. Врач-аллерголог-иммунолог\"}}},{\"fullUrl\":\"Task/f5735958-dac5-4c5a-9e27-d63f5da6a398\",\"resource\":{\"resourceType\":\"Task\",\"id\":\"f5735958-dac5-4c5a-9e27-d63f5da6a398\",\"meta\":{\"lastUpdated\":\"2024-04-16T10:30:00Z\",\"profile\":[\"https://fhir.by/StructureDefinition/EpisodeToBePaid\"]},\"basedOn\":[{\"reference\":\"EpisodeOfCare/td-2adc6d03-aa85-11f0-a672-29bb57731f05\"}],\"status\":\"requested\",\"intent\":\"order\",\"for\":{\"reference\":\"Patient/pc-8eedee99-1909-4d17-93bf-b8ffb0c5e580\",\"display\":\"Евдокимова Людмила Ивановна\"},\"executionPeriod\":{\"start\":\"2025-08-01\",\"end\":\"2025-11-05\"},\"requester\":{\"reference\":\"Organization/14736518-cc34-4e2e-8d60-204955589577\",\"display\":\"Учреждение здравоохранения '1-я центральная районная клиническая поликлиника Центрального района г.Минска'\"},\"owner\":{\"reference\":\"PractitionerRole/aa75bddc-a4dd-11f0-b638-c4e71bd51ce2\",\"display\":\"Врач-специалист, Филатов Игорь Петрович\"},\"performer\":[{\"actor\":{\"reference\":\"Patient/pa-f1b518a6-8e4f-11f0-999f-c3f3a43aa182\",\"display\":\"Евдокимова Людмила Ивановна\"}}]}},{\"fullUrl\":\"Provenance/def8dec1-c85d-4dba-a904-96042bca198f\",\"resource\":{\"resourceType\":\"Provenance\",\"id\":\"def8dec1-c85d-4dba-a904-96042bca198f\",\"meta\":{\"profile\":[\"https://fhir.by/StructureDefinition/ProvenanceDocumentInfoTD\"]},\"target\":[{\"reference\":\"Patient/pa-f1b518a6-8e4f-11f0-999f-c3f3a43aa182\"}],\"recorded\":\"2025-04-16T10:30:00Z\",\"authorization\":[{\"reference\":{\"reference\":\"Task/f5735958-dac5-4c5a-9e27-d63f5da6a398\"}}],\"patient\":{\"reference\":\"Patient/pa-f1b518a6-8e4f-11f0-999f-c3f3a43aa182\"},\"agent\":[{\"type\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/AgentTypeProvenance\",\"code\":\"organization\"}]},\"who\":{\"reference\":\"Organization/14736518-cc34-4e2e-8d60-204955589577\",\"display\":\"Учреждение здравоохранения '1-я центральная районная клиническая поликлиника Центрального района г.Минска'\"}},{\"type\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/AgentTypeProvenance\",\"code\":\"practitioner\"}]},\"who\":{\"reference\":\"Practitioner/aa1e6487-a4dd-11f0-b638-c4e71bd51ce2\",\"display\":\"Филатов Игорь Петрович\"}},{\"type\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/AgentTypeProvenance\",\"code\":\"practitionerRole\"}]},\"who\":{\"reference\":\"PractitionerRole/aa75bddc-a4dd-11f0-b638-c4e71bd51ce2\",\"display\":\"Врач-специалист, Филатов Игорь Петрович\"}}]}}]}"
    },
    {
      "key": "randomGuid",
      "value": "d3029164-7b95-4adf-8bcb-98214b309e14"
    },
    {
      "key": "bundleId",
      "value": "64e8a4fd-aa85-11f0-8bd9-f6fd720850b0"
    },
    {
      "key": "StatusUrl",
      "value": "http://localhost:5192/fhir/Bundle/64e8a4fd-aa85-11f0-8bd9-f6fd720850b0/$status"
    },
    {
      "key": "tdResource",
      "value": "{\"resourceType\":\"EpisodeOfCare\",\"id\":\"td-dbacfd78-aa84-11f0-a672-29bb57731f05\",\"meta\":{\"profile\":[\"https://fhir.by/StructureDefinition/EpisodeOfTemporaryDisability\"]},\"extension\":[{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDisabilityKindDisability\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TemporaryDisabilityKindDisability\",\"version\":\"1.18\",\"code\":\"09\",\"display\":\"в связи с беременностью и родами, в том числе наступившими до 30 недель беременности (27 недель беременности - у женщин, постоянно (преимущественно) проживающих и (или) работающих, проходящих службу, обучающихся на территории радиоактивного загрязнения), осложнениями беременности, родов и (или) послеродового периода, а также усыновлением (удочерением), установлением опеки над ребенком в возрасте до 3 месяцев (беременность и роды)\"}]}},{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDiasabilityEncounterAction\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/SeakLeavePeriod\",\"version\":\"1.1\",\"code\":\"close\",\"display\":\"Закрытие случая\"}]}},{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDisabilityRegime\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TemporaryDisabilityRegime\",\"version\":\"1\",\"code\":\"1\",\"display\":\"амбулаторный\"}]}},{\"url\":\"https://fhir.by/StructureDefinition/TDCaseClosing\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TDCaseClosing\",\"version\":\"1.15\",\"code\":\"1\",\"display\":\"Пациент признан трудоспособным, или закрывается ЛН в связи с уходом за больным членом семьи\"}]}},{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDisabilityPeriodPaid\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TemporaryDisabilityPeriodPaidCode\",\"version\":\"1.2\",\"code\":\"1\",\"display\":\"оплачиваемый период\"}]}},{\"url\":\"https://fhir.by/StructureDefinition/HeadOfUnit\",\"valueReference\":{\"reference\":\"PractitionerRole/ddd5df67-a4e5-11f0-b638-c4e71bd51ce2\",\"display\":\"Свиридович Виктория Геннадьевна. Врач авиационный\"}}],\"status\":\"finished\",\"reason\":[{\"use\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TemporaryDisabilityReasonOfDisability\",\"version\":\"1.1\",\"code\":\"85\",\"display\":\"Отпуск по беременности и родам\"}]}}],\"patient\":{\"reference\":\"Patient/Patient3\",\"display\":\"Людмила Ивановна\"},\"managingOrganization\":{\"reference\":\"Organization/14736518-cc34-4e2e-8d60-204955589577\",\"display\":\"Открытое акционерное общество \\\"Агентство сервисизации и реинжиниринга\\\"\"},\"period\":{\"start\":\"2025-08-01\",\"end\":\"2025-11-05\"},\"careManager\":{\"reference\":\"PractitionerRole/aa75bddc-a4dd-11f0-b638-c4e71bd51ce2\",\"display\":\"Царенко Сергей Владимирович. Врач-аллерголог-иммунолог\"}}"
    },
    {
      "key": "patientBundleReference",
      "value": "Patient/Patient3"
    },
    {
      "key": "pregnancyTempDisSum",
      "value": "td-2adc6d03-aa85-11f0-a672-29bb57731f05"
    },
    {
      "key": "tdSumResource",
      "value": "{\"resourceType\":\"EpisodeOfCare\",\"id\":\"td-2adc6d03-aa85-11f0-a672-29bb57731f05\",\"meta\":{\"profile\":[\"https://fhir.by/StructureDefinition/EpisodeOfTemporaryDisabilitySum\"]},\"extension\":[{\"extension\":[{\"url\":\"https://fhir.by/StructureDefinition/PractitionerRoleReference\",\"valueReference\":{\"reference\":\"PractitionerRole/aa75bddc-a4dd-11f0-b638-c4e71bd51ce2\",\"display\":\"Царенко Сергей Владимирович. Врач-аллерголог-иммунолог\"}},{\"url\":\"https://fhir.by/StructureDefinition/OrganizationReference\",\"valueReference\":{\"reference\":\"Organization/14736518-cc34-4e2e-8d60-204955589577\",\"display\":\"Открытое акционерное общество \\\"Агентство сервисизации и реинжиниринга\\\"\"}},{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDisabilityRegime\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TemporaryDisabilityRegime\",\"version\":\"1\",\"code\":\"1\",\"display\":\"амбулаторный\"}]}},{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDisabilityPeriodPaid\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TemporaryDisabilityPeriodPaidCode\",\"version\":\"1.2\",\"code\":\"1\",\"display\":\"оплачиваемый период\"}]}},{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDisabilityKindDisability\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TemporaryDisabilityKindDisability\",\"version\":\"1.18\",\"code\":\"09\",\"display\":\"в связи с беременностью и родами, в том числе наступившими до 30 недель беременности (27 недель беременности - у женщин, постоянно (преимущественно) проживающих и (или) работающих, проходящих службу, обучающихся на территории радиоактивного загрязнения), осложнениями беременности, родов и (или) послеродового периода, а также усыновлением (удочерением), установлением опеки над ребенком в возрасте до 3 месяцев (беременность и роды)\"}]}},{\"url\":\"https://fhir.by/StructureDefinition/PractitionerRoleReference\",\"valueReference\":{\"reference\":\"PractitionerRole/ddd5df67-a4e5-11f0-b638-c4e71bd51ce2\",\"display\":\"Свиридович Виктория Геннадьевна. Врач авиационный\"}},{\"url\":\"https://fhir.by/StructureDefinition/TemporaryDisabilityEncounterPeriod\",\"valuePeriod\":{\"start\":\"2025-08-01\",\"end\":\"2025-11-05\"}}],\"url\":\"https://fhir.by/StructureDefinition/ReleasePeriod\"},{\"url\":\"https://fhir.by/StructureDefinition/TDCaseClosing\",\"valueCodeableConcept\":{\"coding\":[{\"system\":\"https://fhir.by/ValueSet/TDCaseClosing\",\"version\":\"1.15\",\"code\":\"1\",\"display\":\"Пациент признан трудоспособным, или закрывается ЛН в связи с уходом за больным членом семьи\"}]}}],\"identifier\":[{\"use\":\"usual\",\"value\":\"2025000000000223\"}],\"status\":\"finished\",\"patient\":{\"reference\":\"Patient/pa-f1b518a6-8e4f-11f0-999f-c3f3a43aa182\",\"display\":\"Людмила Ивановна\"},\"period\":{\"start\":\"2025-08-01\",\"end\":\"2025-11-05\"},\"careManager\":{\"reference\":\"PractitionerRole/aa75bddc-a4dd-11f0-b638-c4e71bd51ce2\",\"display\":\"Царенко Сергей Владимирович. Врач-аллерголог-иммунолог\"}}"
    },
    {
      "key": "tdSumIdentifier",
      "value": "2025000000000223"
    },
    {
      "key": "EpisodeOfCareVN",
      "value": ""
    },
    {
      "key": "patientId",
      "value": ""
    },
    {
      "key": "docIdentifier",
      "value": ""
    },
    {
      "key": "docIdentifierValue",
      "value": ""
    }
  ]
}